返回列表 發帖
本帖最後由 劉得恩 於 2016-1-16 16:57 編輯
  1. import javax.swing.*;
  2. public class Ch77{
  3.     public static void main(String args[])
  4.     {
  5.         JFrame f1=new JFrame("\ufedd\u0aed A\u0303\u0310\u3300");
  6.         f1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  7.         f1.setVisible(true);
  8.         f1.setResizable(false);
  9.         f1.setLayout(null);
  10.         f1.setBounds(100,100,500,500);
  11.         JButton btn1=new JButton("1"),btn2=new JButton("2");
  12.         btn1.setBounds(200,200,120,120);
  13.        btn1.setEnabled(false);
  14.         btn2.setBounds(200,300,100,100);
  15.         f1.add(btn1);
  16.         f1.add(btn2);


  17.     }
  18. }
複製代碼

TOP

返回列表