我是新手,下面只是想显示如图界面,但显示不出来,各位麻烦看一下
我是新手,下面只是想显示如图界面,但显示不出来,各位麻烦看一下:
public class AddStudentFrame extends javax.swing.JFrame {
/** Creates new form AddStudentFrame */
public AddStudentFrame() {
initComponents();
}
// @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jLabelStudentID = new javax.swing.JLabel();
jLabelGender = new javax.swing.JLabel();
jLabelGrade = new javax.swing.JLabel();
jLabelPhoneNum = new javax.swing.JLabel();
jLabelStudentName = new javax.swing.JLabel();
jTextFieldName = new javax.swing.JTextField();
jTextFieldStudentID = new javax.swing.JTextField();
jTextFieldGrade = new javax.swing.JTextField();
jTextFieldPhoneNum = new javax.swing.JTextField();
jRadioButton1 = new javax.swing.JRadioButton();
jRadioButton2 = new javax.swing.JRadioButton();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jLabelStudentID.setText("学号:");
jLabelGender.setText("性别:");
jLabelGrade.setText("班级:");
jLabelPhoneNum.setText("联系电话:");
jLabelStudentName.setText("姓名:");
jRadioButton1.setSelected(true);
jRadioButton1.setText("男");
jRadioButton2.setText("女");
jButton1.setText("确定");
jButton2.setText("取消");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(48, 48, 48)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)