正在加载图片...
3、图形界面下的输入输出: Java application import java. awt. public class GraphicsApplctInOut public static void main( String[ args) Applet frame MyFrame=new Applct Frame class ApplctFrame extends Frame Label pt; TextField input; Label output Applctframeo { super(“^ Application Graphic Frame)y/调用父类方法指定图形界面窗口标题 setLayout(new FlowLayouto) prompt=new Label("enter a character please input=new Text Field(10) output=new Label( add(prompt add (input): add (output)3、图形界面下的输入输出:Java Application import java.awt.*; public class GraphicsApplctInOut { public static void main(String[] args) { ApplctFrame MyFrame=new ApplctFrame(); }} class ApplctFrame extends Frame { Label prompt; TextField input; Label output; ApplctFrame() {super(“Application Graphic Frame”);//调用父类方法指定图形界面窗口标题 setLayout(new FlowLayout()); prompt=new Label("enter a character please:"); input=new TextField(10); output=new Label(" "); add(prompt); add(input); add(output); pack(); show(); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有