/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */package foodmeterproject;import java.awt.Color;/** * * @author al-sany */public class FoodMeterProject { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here FirstFrame frame=new FirstFrame(); frame.setVisible(true); frame.setBackground(Color.green); }}我想改變我的程序背景。有一個JPanel。我想給它的背景上色。我用frame.setBackground(Color.green),但它不能改變背景。你們能幫幫我嗎?提前致謝。
面板的背景顏色
HUH函數(shù)
2022-10-12 10:53:06