我在书上看到这样一个小程序
import java.awt.*;public class MyFrame extends Frame{
public static void main(String args[]){
MyFrame fr=new MyFrame("Hello Out There!");
//下面调用来自component 类的setSize方法
fr.setSize(400,200);
fr.setBackground(Color.blue);
fr.setVisible(true);
}
public MyFrame(String str1){
super(str1);
}
}请问public MyFrame(String str1){
super(str1);
}
这个函数是什么意思??
import java.awt.*;public class MyFrame extends Frame{
public static void main(String args[]){
MyFrame fr=new MyFrame("Hello Out There!");
//下面调用来自component 类的setSize方法
fr.setSize(400,200);
fr.setBackground(Color.blue);
fr.setVisible(true);
}
public MyFrame(String str1){
super(str1);
}
}请问public MyFrame(String str1){
super(str1);
}
这个函数是什么意思??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货