本帖最後由 洪藜芸 於 2020-6-13 16:16 編輯
- import javax.swing.JFrame;
- public class advsbhsm {
- public static void main(String[] args){
- JFrame a=new JFrame("視窗1");
- JFrame a2=new JFrame("視窗2");
- JFrame a3=new JFrame("視窗3");
- a.setBounds(100,100,200,200);
- a2.setBounds(300,100,200,200);
- a3.setBounds(500,100,200,200);
- a.setVisible(true);
- a.setResizable(false);
- a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- a2.setVisible(true);
- a2.setResizable(false);
- a2.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
- a3.setVisible(true);
- a3.setResizable(false);
- a3.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
- }
- }
複製代碼 |