第一个gui就没有调试成功,帮帮。。只有10分拉 单词写错了fr.setBackground()fr.setVisible() 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 import java.awt.*;public class ExGui extends Frame{ //Constructor public ExGui(String str) { super(str); } public static void main(String[] args) { ExGui fr=new ExGui("framewithPanel"); Panel pan=new Panel(); fr.setSize(400,400); fr.setBackground(Color.blue); fr.setLayout(null); pan.setSize(200,200); pan.setBackground(Color.green); fr.add(pan); fr.setVisible(true); }} 请问什么是 闭包? 编写java程序,计算1!+2!+3!+...20!之和并在屏幕上输出 帮我一下哈! 小弟跪地求程序,求各位大人帮忙!!!!!! 如何快速定位一个字符串在字符串数组的位置? 关于java.io.Serializable的问题 紧急求助:关于设置电脑时间的问题? 求救! 关于interface使用的疑问,盼各位回答! 為什麼drawImage方法不顯示圖片 请问界面设计 大家能说一下eclipse的优点吗?
{
//Constructor
public ExGui(String str)
{
super(str);
}
public static void main(String[] args)
{
ExGui fr=new ExGui("framewithPanel");
Panel pan=new Panel();
fr.setSize(400,400);
fr.setBackground(Color.blue);
fr.setLayout(null);
pan.setSize(200,200);
pan.setBackground(Color.green);
fr.add(pan);
fr.setVisible(true);
}
}