So setzen Sie die Rahmen -Colo in Java
getContentPane().setBackground(Color.YELLOW); //Whatever color
Uninterested Unicorn
getContentPane().setBackground(Color.YELLOW); //Whatever color
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JFrame;
public class SwingDemo {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setPreferredSize(new Dimension(550, 300));
frame.getContentPane().setBackground(Color.BLUE);
frame.pack();
frame.setVisible(true);
}
}
private JFrame frame;
frame.getContentPane().setBackground(Color.BLACK);