- import javax.swing.JFrame;
- public class aaa {
- public static void main(String args[])
- {
- JFrame x=new JFrame("視窗一");
- JFrame A=new JFrame("視窗二");
- JFrame B=new JFrame("視窗三");
- x.setBounds(100,100,200,200);
- x.setVisible(true);
- x.setResizable(false);
- x.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
- A.setBounds(200,100,200,200);
- A.setVisible(true);
- A.setResizable(false);
- A.setDefaultCloseOperation( JFrame. HIDE_ON_CLOSE);
- B.setBounds(300,100,200,200);
- B.setVisible(true);
- B.setResizable(false);
- B.setDefaultCloseOperation( JFrame. HIDE_ON_CLOSE);
-
- }
- }
複製代碼 |