package com.yds.gui.applet;import java.awt.Color;import java.awt.Container;import java.awt.GridLayout;import javax.swing.JFrame;import javax.swing.JLabel;public class JFtext1 { /** * @param args */ public static void main(String[] args) { JFrame jf=new JFrame(); Cont...
package com.yds.gui.fourpart;import java.awt.Button;import java.awt.FileDialog;import java.awt.Frame;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;public class FileSave implements ActionListener{ Button b1,b2; FileDialog f_open,f_save; Frame f; public void Ui(){...
import java.awt.*;import java.awt.event.*;public class TestDialog implements ActionListener{ private Label info; private Dialog loginDialog; private Dialog quitDialog; private TextField tf_name; private TextField tf_psw; public static void main( String args[]) { new Tes...
package com.yds.gui.twopart;import java.awt.*;import java.awt.event.*;public class TestChoice implements ItemListener,ActionListener{ TextField name; CheckboxGroup cg; Choice career; List city; Checkbox[] favorite; public static void main( String args[]) { new TestChoic...
package com.yds.gui.fourpart;import java.awt.Button;import java.awt.Checkbox;import java.awt.CheckboxGroup;import java.awt.Choice;import java.awt.FlowLayout;import java.awt.Frame;import java.awt.GridLayout;import java.awt.Label;import java.awt.List;import java.awt.Panel;import java.awt.TextFiel...
public static void main(String[] args) { Frame f=new Frame("记事本"); MenuBar mb=new MenuBar(); Menu m1=new Menu("打开"); MenuItem mi1=new MenuItem("打开"); MenuItem mi2=new MenuItem("保存"); MenuItem mi3=new MenuItem("另存为"); MenuItem mi4=new MenuItem("退出"); Monst...
package com.yds.gui.fourpart;import java.awt.Button;import java.awt.Frame;import java.awt.Panel;import java.awt.TextArea;import java.awt.TextField;import java.awt.event.WindowAdapter;import java.awt.event.WindowEvent;public class TextAreaBea { Frame f; TextArea ta; Button b; TextFie...
import java.awt.*;import java.awt.event.*;
public class TestTextField implements ActionListener{ TextField name; TextField password; public static void main( String args[]) { TestTextField ttf = new TestTextField(); ttf.createUI(); } public void createUI(){ Frame f = new Frame("登录界面"); ...
public static void main(String[] args) { Frame f = new Frame("客户端"); Panel p1 = new Panel(); Label l1 = new Label("地址"); TextField t1 = new TextField(8); Label l2 = new Label("端口号"); TextField t2 = new TextField(4); Label l3 = new Label("称呢"); TextField t3 = new TextField(12); Button b1 ...