返回列表 發帖
  1. import javax.swing.JFrame;
  2. public class Ch01{
  3.         public static void main(String[] args) {
  4.         JFrame x=new JFrame("我的第一個視窗");
  5.         x.setBounds(100,100,200,200);
  6.         x.setVisible(true);
  7.         x.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
  8.         x.setResizable(true);
  9.         JFrame y=new JFrame("我的第二個視窗");
  10.         y.setBounds(300,100,200,200);
  11.         y.setVisible(true);
  12.         y.setDefaultCloseOperation( JFrame.HIDE_ON_CLOSE);
  13.         y.setResizable(true);
  14.         JFrame z=new JFrame("我的第三個視窗");
  15.         z.setBounds(500,100,200,200);
  16.         z.setVisible(true);
  17.         z.setDefaultCloseOperation( JFrame.HIDE_ON_CLOSE);
  18.         z.setResizable(true);
  19.     }
  20. }
複製代碼

TOP

返回列表