📜  如何在java代码示例中设置jframe中的背景颜色

📅  最后修改于: 2022-03-11 14:52:22.482000             🧑  作者: Mango

代码示例2
package Exaple;

import java.awt.Color;

import javax.swing.JFrame;

public class Window {

    public static void main(String[] args) {
        
        JFrame frame = new JFrame(); 
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH); 
        frame.setVisible(true);
        frame.setTitle("Expaple");
        frame.setBackground(Color.BLUE);