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


  2. public class Main {
  3.         public static void main(String args[])
  4.         {
  5.                 JFrame fm = new JFrame();
  6.                 JFrame fm2 = new JFrame();
  7.                 JFrame fm3 = new JFrame();

  8.                 fm.setTitle("視窗一");
  9.                 fm.setLocation(100,100);
  10.                 fm.setSize(200,200);
  11.                 fm.setVisible(true);
  12.                 fm.setResizable(false);
  13.         fm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  14.         
  15.         fm2.setTitle("視窗二");
  16.                 fm2.setLocation(300,100);
  17.                 fm2.setSize(200,200);
  18.                 fm2.setVisible(true);
  19.                 fm2.setResizable(false);
  20.         fm2.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
  21.         
  22.         fm3.setTitle("視窗三");
  23.                 fm3.setLocation(500,100);
  24.                 fm3.setSize(200,200);
  25.                 fm3.setVisible(true);
  26.                 fm3.setResizable(false);
  27.         fm3.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
  28.         }
  29. }
複製代碼

TOP

返回列表