repositories
/
Persons_Comparator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only draw eyes on selection and the full closest person on validation.
[Persons_Comparator.git]
/
src
/
PersonLeftPanel.java
diff --git
a/src/PersonLeftPanel.java
b/src/PersonLeftPanel.java
index a7022fb9460de77364a9016d7797982768ec164d..e5892a63a32642e94dcf01cd5e3b6b121c22dcae 100644
(file)
--- a/
src/PersonLeftPanel.java
+++ b/
src/PersonLeftPanel.java
@@
-22,10
+22,16
@@
public class PersonLeftPanel extends JPanel {
super.paintComponent(g);
// Draw
super.paintComponent(g);
// Draw
- g.setColor(Color.black);
Graphics2D g2d = (Graphics2D) g;
int imageWidth = 120;
int imageHeight = 180;
g2d.drawImage(this.personImage.getScaledInstance(imageWidth / 2, imageHeight / 2, Image.SCALE_SMOOTH), imageWidth / 4, imageHeight / 4, this);
}
Graphics2D g2d = (Graphics2D) g;
int imageWidth = 120;
int imageHeight = 180;
g2d.drawImage(this.personImage.getScaledInstance(imageWidth / 2, imageHeight / 2, Image.SCALE_SMOOTH), imageWidth / 4, imageHeight / 4, this);
}
+
+ public void drawEyes(Color color) {
+ Graphics g = this.getGraphics();
+ g.setColor(color);
+ g.fillOval(50, 50, 6, 3);
+ g.fillOval(62, 50, 6, 3);
+ }
}
}