The following test case can be used to reproduce the problem: import java.awt.*; public class TestGUI1 extends Window { public TestGUI1(Frame owner) { super(owner); } public static void main(final String[] args) { final Frame frame = new Frame("SetLocJWin Test Frame"); frame.setSize(500,500); final TestGUI1 window = new TestGUI1(frame); window.setBackground(Color.RED); window.setSize(200, 200); window.setLocationRelativeTo(null); window.setVisible(true); } }
|