1. 一个简单的swing public class Test(){ public static void main(String[] args){ JFrame frame = new JFrame(); JPanel panel = new JPanel(); JTextArea textArea = new JTextArea(); panel.setLayout(new GridLayout()); textArea.setText("test"); //当TextArea里的
1. 一个简单例子: public class Test(){ public static void main(String[] args){ JFrame frame = new JFrame(); JPanel panel = new JPanel(); JTextArea textArea = new JTextArea(); panel.setLayout(new GridLayout()); textArea.setText("test"); //当TextArea里的内容过
//第一种方式 procedure TForm1.btn1Click(Sender: TObject); begin With TForm2.Create(Application) do Try ShowModal; finally free; end; end; //第二种方式 procedure TForm1.btn2Click(Sender: TObject); begin if not assigned(Form2) then begin Form2:=TForm2.Create(nil
public class Test { public static void main(String[] args) { // TODO Auto-generated method stub Frame f = new Frame(); //关闭窗口 f.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { System.exit(0); } }); //设置尺寸
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Welcome to Ext JS 5.0</title> <meta name="description" content="Create amazing web apps built on web standards.