-
Grapics =P
so ... i have a grapics class that paintsCompnent ...
my problem is this :
Code:
Font font = new Font("Helvetica", Font.BOLD, 14);
public void paintComponent(Graphics g) {
g.setFont(font);
(DRAW STRINGS HERE)
}
so ... when i paint the text with setfont there is some delay...
and when i dont set the font its super fast ... (just outcommect the setFont).. I really want it set a font ... is there a reason for this delay? =P
thanks =)
-
Could post a small program the compiles and executes and demonstrates the problem?
-
Unless you are using multiple Font's in the paintComponent() method you should not be setting the Font there. You should just be using:
Code:
MyComponent component = new MyComponent();
component.setFont(...);
Then the Graphics object will already be set with the proper Font.