import java.awt.*;
import javax.swing.*;
public class Jframe_Test extends JFrame {
   JTextField text_test=new JTextField();
   JButton button_test=new JButton();
   public Jframe _Test() {
      setLayout(null);
      setTitle("JFrame类的使用");
      text_test.setBounds(36, 14, 120, 40);   
      button_test.setBounds(36, 70, 120, 40);
      text_test.setText("轻组件文本");
      button_test.setText("轻组件按钮");
      this.add(text_test);
      this.add(button_test);
      Toolkit tool = getToolkit();
      Dimension dim = tool.getScreenSize();
      setBounds(0, 0, dim.width, dim.height);
    }
    public static void main(String args[]) {
      Jframe_Test jf = new Jframe_Test ();
      jf.setBounds(200, 200, 200, 150);
      jf.setVisible(true);
    }
}


