|
@@ -52,14 +52,10 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- //img = new ImageIcon(this.getClass().getResource("/Images/Dummy_House.png")).getImage()
|
|
|
|
- // .getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
|
|
|
|
-
|
|
|
|
this.addMouseListener(this);
|
|
this.addMouseListener(this);
|
|
this.addMouseMotionListener(this);
|
|
this.addMouseMotionListener(this);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Paints all Components on the Canvas
|
|
* Paints all Components on the Canvas
|
|
*
|
|
*
|
|
@@ -69,7 +65,7 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
|
|
public void paintComponent(Graphics g) {
|
|
public void paintComponent(Graphics g) {
|
|
super.paintComponent(g);
|
|
super.paintComponent(g);
|
|
if(selectRect != null){
|
|
if(selectRect != null){
|
|
- g.setColor(new Color(220, 220, 220));
|
|
|
|
|
|
+ g.setColor(new Color(100, 255, 100));
|
|
g.fillRect((int)selectRect.getX(), (int)selectRect.getY(), (int)selectRect.getWidth(), (int)selectRect.getHeight());
|
|
g.fillRect((int)selectRect.getX(), (int)selectRect.getY(), (int)selectRect.getWidth(), (int)selectRect.getHeight());
|
|
}
|
|
}
|
|
|
|
|