I am using Windows 7 with Aero, and have a very fast graphics card (Radeon 6870) that I use for gaming.

I have some issues when resizing very simple programs I make with java. For instance, this program does absolutely nothing. It has no action listeners, no loops. It's simply a GUI interface with buttons.

Resizing with OpenGL acceleration off:

[View fullscreen] Sluggish resizing

It takes about a second to resize the components. For me that's very noticeable.

Resizing with OpenGL acceleration on:

enter image description here

I have tried to enable OpenGl acceleration to solve this problem. I compiled the JAR and run it with java -Dsun.java2d.opengl=true -jar C:\Test.jar. The result is slightly less black areas around the window, but much more flickering. In fact the flickering shows up as grey in the screenshot above.

Is the issue present in any other software?

No. Eclipse, Netbeans, Chrome and other applications have been tested. None have this issue. Therfore I must conclude that there must be some problem with the code. Various people have run this code and said they have "No issues". If you are going to test it, please make sure you resize the window from the smallest size to the largest size of the screen, whilst moving the mouse in circular motion.

Code:

import java.awt.*;
import javax.swing.*;

public class JFrameWithButtonsTest {
    private int iScreen = 25;  
    private int iLocation = 10;
    JFrame frame = new JFrame();
    Container contentPane = frame.getContentPane();

    public JFrameWithButtonsTest() {
        JPanel northButtonPanel = new JPanel();
        northButtonPanel.setLayout(new GridLayout(2,2));
        northButtonPanel.add(new JButton(" I do 
Edit
Report