ok
This commit is contained in:
parent
f9ed780a2d
commit
834600c514
@ -69,13 +69,13 @@ public class BoutonsMenu extends JComponent{
|
||||
}
|
||||
secondPinceau.setColor(new Color(255, 255, 255));
|
||||
secondPinceau.setFont(new Font(Font.SANS_SERIF, Font.BOLD, (this.getWidth()/10)));
|
||||
FontMetrics metrics = secondPinceau.getFontMetrics(new Font(Font.SANS_SERIF, Font.BOLD, this.getWidth()/10));
|
||||
FontMetrics metrics = secondPinceau.getFontMetrics(secondPinceau.getFont());
|
||||
int x =(this.getWidth() - metrics.stringWidth(this.path)) / 2;
|
||||
int y = ((this.getHeight() - metrics.getHeight()) / 3) + metrics.getAscent();
|
||||
secondPinceau.drawString((this.path.toUpperCase()), x, y);
|
||||
//DISPO OU PAS
|
||||
secondPinceau.setFont(new Font(Font.SANS_SERIF, Font.BOLD, (this.getWidth()/20)));
|
||||
metrics = secondPinceau.getFontMetrics(new Font(Font.SANS_SERIF, Font.BOLD, this.getWidth()/20));
|
||||
metrics = secondPinceau.getFontMetrics(secondPinceau.getFont());
|
||||
x = (this.getWidth() - metrics.stringWidth(dispo)) / 2;
|
||||
y = ((this.getHeight() - metrics.getHeight()) / 3*2) + metrics.getAscent();
|
||||
secondPinceau.drawString(dispo, x, y);
|
||||
|
Loading…
Reference in New Issue
Block a user