- import javax.swing.JFrame;
- public class Incredible {
- public static void main(String[] args) {
- // TODO 自動產生的方法 Stub
- JFrame x=new JFrame("視窗1");
- JFrame y=new JFrame("視窗2");
- JFrame z=new JFrame("視窗3");
- x.setBounds(100,100,200,200);
- x.setVisible(true);
- x.setResizable(false);
- x.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
- y.setBounds(300, 100, 200, 200);
- y.setVisible(true);
- y.setResizable(false);
- y.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE );
- z.setBounds(500, 100, 200, 200);
- z.setVisible(true);
- z.setResizable(false);
- z.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE );
- }
- }
複製代碼 |