Retrieve the content pane for the frame and use the setBackground() method inherited from Component to change the color.
Example:
myJFrame.getContentPane().setBackground( desiredColor );
More Related Contents:
- Graphics rendering in title bar
- How do I make a rectangle move across the screen with key bindings?
- Drawing in Java using Canvas
- Draw a line in a JPanel with button click in Java
- Java and GUI – Where do ActionListeners belong according to MVC pattern?
- What is the difference between Swing and AWT?
- Drawing a rectangle that won’t disappear in next paint
- Drawing Multiple JComponents to a Frame
- Printing a JFrame and its components
- Java Animate JLabel
- How to draw a tree representing a graph of connected nodes?
- java multiple graphics [closed]
- Zoom box for area around mouse location on screen [closed]
- Create the square, rectangle, triangle of java in jframe [closed]
- Java: How to draw non-scrolling overlay over ScrollPane Viewport?
- Why are my items not showing up in JFrame?
- Get effective screen size from Java
- Saving a Java 2d graphics image as .png file
- Java make a directed line and make it move
- Java: mouseDragged and moving around in a graphical interface
- How to make AWT Button() and use ImageIcon(), Icon()?
- Porting a Java app that uses AWT and Swing for drawing movies to the server-side
- KeyListener vs. Key Bindings
- Mirroring animated gif on load in Java – ImageIcon
- How can I make this JButton visible? When I have progressive scan background JWindow()?
- Java2D: Increase the line width
- Getting a HeadlessException: No X11 DISPLAY variable was set
- JFrame: get size without borders?
- Why is paint()/paintComponent() never called?
- How to print a JTable object in the Java application