返回列表 發帖
  1. import javax.swing.JFrame;
  2. public class Incredible {

  3.         public static void main(String[] args) {
  4.                 // TODO 自動產生的方法 Stub
  5.                 JFrame x=new JFrame("視窗1");
  6.                 JFrame y=new JFrame("視窗2");
  7.                 JFrame z=new JFrame("視窗3");
  8.                 x.setBounds(100,100,200,200);
  9.                 x.setVisible(true);
  10.                 x.setResizable(false);
  11.                 x.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
  12.                 y.setBounds(300, 100, 200, 200);
  13.                 y.setVisible(true);
  14.                 y.setResizable(false);
  15.                 y.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE );
  16.                 z.setBounds(500, 100, 200, 200);
  17.                 z.setVisible(true);
  18.                 z.setResizable(false);
  19.                 z.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE );
  20.         }

  21. }
複製代碼

TOP

返回列表