Wie kann ich die Schriftfarbe ändern? Wie die größe? Habe das versucht:
aber es klappt leider nicht. Es wird einfach nichts ausgegeben.
Danke schon mal!
Code:
public void Text(String t, px,py) {
frame.setFont(grafik.getFont().deriveFont(20));
frame.setForeground(Color.RED);
frame.setBackground(Color.BLUE);
grafik.drawString(t, px,p y);
canvas.repaint();
}
aber es klappt leider nicht. Es wird einfach nichts ausgegeben.
Danke schon mal!