setBackground « JFrame « Java Swing Q&A





1. JFrame.setBackground() not working -- why?    stackoverflow.com

    JFrame mainFrame = new JFrame();
    mainFrame.setSize(100, 100);
    mainFrame.setBackground(Color.CYAN);
    mainFrame.setVisible(true);
My intent is to create a window with a cyan ...

2. setBackground() problem in a JFrame    coderanch.com

3. JFrame setBackground failure with contentPane    forums.oracle.com

Hi. This is the first time I am using swing and I seem to be having some trouble. Compiling my code in java 5 and running it on a mac seemed to work fine, but as soon as I went over to a PC (I am a PC user myself) I got some problems. I've seen plenty of suggestions to use ...