- import javax.swing.JFrame;
- public class JF {
-
- public static void main (String args[]) {
-
- JFrame fm1 = new JFrame();
- fm1.setTitle("視窗一");
- fm1.setLocation(100, 100);
- fm1.setSize(200, 200);
- fm1.setVisible(false);
- fm1.setResizable(true);
- fm1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-
- JFrame fm2 = new JFrame();
- fm2.setTitle("視窗二");
- fm2.setLocation(300, 100);
- fm2.setSize(200, 200);
- fm2.setVisible(false);
- fm2.setResizable(true);
- fm2.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
-
-
- JFrame fm3 = new JFrame();
- fm3.setTitle("視窗三");
- fm3.setLocation(600, 100);
- fm3.setSize(200, 200);
- fm3.setVisible(false);
- fm3.setResizable(true);
- fm3.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
-
-
- }
- }
複製代碼 |