返回列表 發帖
  1. import javax.swing.JFrame;


  2. public class JF {
  3.        
  4.         public static void main (String args[]) {
  5.                
  6.                 JFrame fm1 = new JFrame();   
  7.                 fm1.setTitle("視窗一");
  8.                 fm1.setLocation(100, 100);
  9.         fm1.setSize(200, 200);
  10.         fm1.setVisible(false);
  11.         fm1.setResizable(true);
  12.         fm1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  13.       
  14.         JFrame fm2 = new JFrame();
  15.         fm2.setTitle("視窗二");
  16.                 fm2.setLocation(300, 100);
  17.         fm2.setSize(200, 200);
  18.         fm2.setVisible(false);
  19.         fm2.setResizable(true);
  20.         fm2.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
  21.         
  22.       
  23.         JFrame fm3 = new JFrame();
  24.         fm3.setTitle("視窗三");
  25.                 fm3.setLocation(600, 100);
  26.         fm3.setSize(200, 200);
  27.         fm3.setVisible(false);
  28.         fm3.setResizable(true);
  29.         fm3.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
  30.         
  31.       
  32.         }
  33. }
複製代碼

TOP

返回列表