0

Im having a simple JFrame which draws a background color. But when i resize the window, the background color is somehow lagging, as you can see in the screenshot. Is there a way to prevent this issue?

public class ToolBarTest extends JFrame{
    public ToolBarTest(){
        getContentPane().setBackground(new Color(221,221,221));
        setSize(400,250);
        setTitle("Hello");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(String ... args){
        new ToolBarTest().setVisible(true);
    }
}

enter image description here



SOLUTION:

Remove JVM and JDK 7 and reinstall java 6.
Conclusion: dont use java 7 on mac os. (?)

domizai
  • 343
  • 1
  • 5
  • 13
  • Does it actually fill to expand the window after a certain amount of time or does the background just remain that size regardless of how much resizing takes place? – Surveon Aug 27 '13 at 17:16
  • it fills the whole window again. it kinda lags a few milliseconds behind... – domizai Aug 27 '13 at 17:27
  • 1
    Have you tried placing a panel with the background into the frame? I wasn't able to duplicate the issue you're having, so it may be hardware related. – Surveon Aug 27 '13 at 17:33

1 Answers1

0

I tried Quaqua. Again, not working properly on Lion, Snow Leopard, no problem... So do i just need to install an older version of the JRE?

enter image description here

EDIT: It is indeed the JRE 7. I updated My Desktop Lion 10.7, which was still using Java 6 – now its lagging too. I mean, this sucks big time...

domizai
  • 343
  • 1
  • 5
  • 13