第1个回答 2009-12-28
我 晕 用JBuilder操作的话,基本上就像画图一样
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Rectangle;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JScrollPane;
import javax.swing.JEditorPane;
import javax.swing.JCheckBox;
import javax.swing.JTable;
public class Frame1 extends JFrame {
public Frame1() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(null);
jLabel1.setFont(new java.awt.Font("宋体", Font.BOLD, 18));
jLabel1.setToolTipText("");
jLabel1.setText("个人信息");
jLabel1.setBounds(new Rectangle(134, 9, 86, 40));
this.getContentPane().add(jLabel1);
jRadioButton2.setToolTipText("");
jRadioButton2.setText("女");
jRadioButton2.setBounds(new Rectangle(235, 103, 57, 23));
jRadioButton1.setToolTipText("");
jRadioButton1.setSelected(true);
jRadioButton1.setText("男");
jRadioButton1.setBounds(new Rectangle(158, 104, 51, 23));
jLabel3.setToolTipText("");
jLabel3.setText("性别:");
jLabel3.setBounds(new Rectangle(48, 97, 59, 37));
jTextField1.setToolTipText("");
jTextField1.setBounds(new Rectangle(143, 57, 153, 27));
this.getContentPane().add(jLabel2);
this.getContentPane().add(jTextField1);
this.getContentPane().add(jRadioButton2);
this.getContentPane().add(jRadioButton1);
this.getContentPane().add(jLabel3);
this.getContentPane().add(jLabel4);
this.getContentPane().add(jTextField2);
this.getContentPane().add(jLabel5);
this.getContentPane().add(jScrollPane1);
this.getContentPane().add(jLabel6);
this.getContentPane().add(jCheckBox3);
this.getContentPane().add(jCheckBox2);
this.getContentPane().add(jCheckBox1);
this.getContentPane().add(jLabel7);
this.getContentPane().add(jScrollPane2);
jScrollPane2.getViewport().add(jTable1);
jScrollPane1.getViewport().add(jEditorPane1);
jLabel2.setToolTipText("");
jLabel2.setText("姓名:");
jLabel2.setBounds(new Rectangle(46, 51, 52, 42));
jLabel4.setToolTipText("");
jLabel4.setText("年龄:");
jLabel4.setBounds(new Rectangle(48, 143, 47, 35));
jTextField2.setToolTipText("");
jTextField2.setBounds(new Rectangle(144, 142, 153, 32));
jLabel5.setToolTipText("");
jLabel5.setText("地址:");
jLabel5.setBounds(new Rectangle(46, 197, 59, 37));
jScrollPane1.setHorizontalScrollBarPolicy(JScrollPane.
HORIZONTAL_SCROLLBAR_ALWAYS);
jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.
VERTICAL_SCROLLBAR_ALWAYS);
jScrollPane1.setBounds(new Rectangle(143, 203, 160, 87));
jEditorPane1.setToolTipText("");
jLabel6.setToolTipText("");
jLabel6.setText("爱好:");
jLabel6.setBounds(new Rectangle(52, 309, 52, 29));
jCheckBox1.setToolTipText("");
jCheckBox1.setText("西瓜");
jCheckBox1.setBounds(new Rectangle(136, 313, 68, 24));
jCheckBox2.setToolTipText("");
jCheckBox2.setText("苹果");
jCheckBox2.setBounds(new Rectangle(202, 320, 67, 17));
jCheckBox3.setToolTipText("");
jCheckBox3.setText("橘子");
jCheckBox3.setBounds(new Rectangle(271, 318, 56, 22));
jLabel7.setToolTipText("");
jLabel7.setText("愿景:");
jLabel7.setBounds(new Rectangle(46, 345, 47, 29));
jScrollPane2.setBounds(new Rectangle(142, 368, 165, 108));
buttonGroup1.add(jRadioButton1);
buttonGroup1.add(jRadioButton2);
}
public static void main(String[] args) {
Frame1 frame1 = new Frame1();
}
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JTextField jTextField1 = new JTextField();
JLabel jLabel3 = new JLabel();
JRadioButton jRadioButton1 = new JRadioButton();
JRadioButton jRadioButton2 = new JRadioButton();
ButtonGroup buttonGroup1 = new ButtonGroup();
JLabel jLabel4 = new JLabel();
JTextField jTextField2 = new JTextField();
JLabel jLabel5 = new JLabel();
JScrollPane jScrollPane1 = new JScrollPane();
JEditorPane jEditorPane1 = new JEditorPane();
JLabel jLabel6 = new JLabel();
JCheckBox jCheckBox1 = new JCheckBox();
JCheckBox jCheckBox2 = new JCheckBox();
JCheckBox jCheckBox3 = new JCheckBox();
JLabel jLabel7 = new JLabel();
JScrollPane jScrollPane2 = new JScrollPane();
JTable jTable1 = new JTable();
}