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

TOP

返回列表