java 中的 pack() package net.mindview.util;import java.awt.*;import java.awt.event.*;public class Eog extends Frame{private Panel panel;private Label label;private String[] names={"7","8","9","+","4","5","6","-","1","2","3","*","0",".","=","/"}
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/18 01:36:00
java 中的 pack() package net.mindview.util;import java.awt.*;import java.awt.event.*;public class Eog extends Frame{private Panel panel;private Label label;private String[] names={"7","8","9","+","4","5","6","-","1","2","3","*","0",".","=","/"}
java 中的 pack()
package net.mindview.util;
import java.awt.*;
import java.awt.event.*;
public class Eog extends Frame{
private Panel panel;
private Label label;
private String[] names={"7","8","9","+","4","5","6","-","1",
"2","3","*","0",".","=","/"
};
private Button[] buttons=new Button[16];
public Eog(String title){
super(title);
label=new Label();
panel=new Panel();
panel.setLayout(new GridLayout(4,4));
add(label,"North");
add(panel,"Center");
for(int i=0;i
java 中的 pack() package net.mindview.util;import java.awt.*;import java.awt.event.*;public class Eog extends Frame{private Panel panel;private Label label;private String[] names={"7","8","9","+","4","5","6","-","1","2","3","*","0",".","=","/"}
pack
public void pack()调整此窗口的大小,以适合其子组件的首选大小和布局.如果该窗口和/或其所有者还不可显示,则在计算首选大小之前都将变得可显示.在计算首选大小之后,将会验证该窗口.