⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 studentsjframe.java

📁 学生管理系统。使用java编程
💻 JAVA
字号:
package com.hb.stumanagesys.basicinfomaintain;
import java.awt.BorderLayout;
import javax.swing.ButtonGroup;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class StudentsJFrame extends javax.swing.JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JPanel studentsPanel;
	private JLabel nameLabel;
	private JLabel studentIdLabel;
	private JTextField infoTextField;
	private JButton querButton;
	private JButton deleteButton;
	private JButton commitButton;
	private JButton addButton;
	private JScrollPane infoScrollPane;
	private JLabel infoLabel;
	private JTextField photoTextField;
	private JLabel photoLabel;
	private JScrollPane remarkScrollPane;
	private JTextArea remarkTextArea;
	private JLabel remarkLabel;
	private JComboBox statusComboBox;
	private ButtonGroup sexbuttonGroup;
	private JComboBox poliStatusComboBox;
	private JLabel statusLabel;
	private JTextField enterTimeTextField;
	private JLabel enterTimeLabel;
	private JComboBox classIdComboBox;
	private JLabel classIdLabel;
	private JTextField nativeTextField;
	private JLabel nativeLabel;
	private JTextField contactWayTextField;
	private JLabel contactWayLabel;
	private JTextField birthDayTextField;
	private JLabel birthDayLabel;
	private JLabel poliStatusLabel;
	private JTextField ageTextField;
	private JLabel ageLabel;
	private JRadioButton femalRadioButton;
	private JRadioButton manRadioButton;
	private JLabel sexLabel;
	private JTextField studentIdTextField;
	private JTextField nameTextField;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(final String[] args) {
		final StudentsJFrame inst = new StudentsJFrame();
		inst.setVisible(true);
	}
	
	public StudentsJFrame() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				{
					sexbuttonGroup = new ButtonGroup();
				}
				studentsPanel = new JPanel();
				getContentPane().add(studentsPanel, BorderLayout.CENTER);
				studentsPanel.setBackground(new java.awt.Color(128,128,255));
				studentsPanel.setLayout(null);
				studentsPanel.setAutoscrolls(true);
				{
					nameLabel = new JLabel();
					studentsPanel.add(nameLabel);
					nameLabel.setText("\u59d3\u540d");
					nameLabel.setBounds(14, 28, 49, 28);
				}
				{
					nameTextField = new JTextField();
					studentsPanel.add(nameTextField);
					nameTextField.setBounds(77, 21, 112, 28);
				}
				{
					studentIdLabel = new JLabel();
					studentsPanel.add(studentIdLabel);
					studentIdLabel.setText("\u5b66\u53f7");
					studentIdLabel.setBounds(12, 69, 63, 28);
				}
				{
					studentIdTextField = new JTextField();
					studentsPanel.add(studentIdTextField);
					studentIdTextField.setBounds(77, 71, 119, 28);
				}
				{
					sexLabel = new JLabel();
					studentsPanel.add(sexLabel);
					sexLabel.setText("\u6027\u522b");
					sexLabel.setBounds(14, 108, 63, 28);
				}
				{
					manRadioButton = new JRadioButton();
					studentsPanel.add(manRadioButton);
					manRadioButton.setText("\u7537");
					manRadioButton.setBounds(77, 112, 42, 28);
					manRadioButton.setSelected(true);
					sexbuttonGroup.add(manRadioButton);
				}
				{
					femalRadioButton = new JRadioButton();
					studentsPanel.add(femalRadioButton);
					femalRadioButton.setText("\u5973");
					femalRadioButton.setBounds(126, 114, 42, 28);
					sexbuttonGroup.add(femalRadioButton);
				}
				{
					ageLabel = new JLabel();
					studentsPanel.add(ageLabel);
					ageLabel.setText("\u5e74\u9f84");
					ageLabel.setBounds(13, 147, 63, 28);
				}
				{
					ageTextField = new JTextField();
					studentsPanel.add(ageTextField);
					ageTextField.setBounds(77, 147, 98, 28);
				}
				{
					poliStatusLabel = new JLabel();
					studentsPanel.add(poliStatusLabel);
					poliStatusLabel.setText("\u653f\u6cbb\u9762\u8c8c");
					poliStatusLabel.setBounds(7, 182, 63, 28);
				}
				{
					final ComboBoxModel poliStatusComboBoxModel = new DefaultComboBoxModel(
						new String[] { "团员", "党员","群众","其他党派"});
					poliStatusComboBox = new JComboBox();
					studentsPanel.add(poliStatusComboBox);
					poliStatusComboBox.setModel(poliStatusComboBoxModel);
					poliStatusComboBox.setBounds(77, 189, 98, 28);
				}
				{
					birthDayLabel = new JLabel();
					studentsPanel.add(birthDayLabel);
					birthDayLabel.setText("\u51fa\u751f\u65e5\u671f");
					birthDayLabel.setBounds(7, 231, 63, 28);
				}
				{
					birthDayTextField = new JTextField();
					studentsPanel.add(birthDayTextField);
					birthDayTextField.setBounds(77, 231, 98, 28);
				}
				{
					contactWayLabel = new JLabel();
					studentsPanel.add(contactWayLabel);
					contactWayLabel.setText("\u8054\u7cfb\u65b9\u5f0f");
					contactWayLabel.setBounds(7, 273, 63, 28);
				}
				{
					contactWayTextField = new JTextField();
					studentsPanel.add(contactWayTextField);
					contactWayTextField.setBounds(77, 273, 98, 28);
				}
				{
					nativeLabel = new JLabel();
					studentsPanel.add(nativeLabel);
					nativeLabel.setText("\u7c4d\u8d2f");
					nativeLabel.setBounds(210, 21, 63, 28);
				}
				{
					nativeTextField = new JTextField();
					studentsPanel.add(nativeTextField);
					nativeTextField.setBounds(245, 21, 119, 28);
				}
				{
					classIdLabel = new JLabel();
					studentsPanel.add(classIdLabel);
					classIdLabel.setText("\u73ed\u7ea7\u53f7");
					classIdLabel.setBounds(203, 70, 63, 28);
				}
				{
					ComboBoxModel classIdComboBoxModel = new DefaultComboBoxModel(
						new String[] { "1", "2","3","4" });
					classIdComboBox = new JComboBox();
					studentsPanel.add(classIdComboBox);
					classIdComboBox.setModel(classIdComboBoxModel);
					classIdComboBox.setBounds(259, 70, 63, 28);
				}
				{
					enterTimeLabel = new JLabel();
					studentsPanel.add(enterTimeLabel);
					enterTimeLabel.setText("\u5165\u5b66\u65f6\u95f4");
					enterTimeLabel.setBounds(196, 112, 63, 28);
				}
				{
					enterTimeTextField = new JTextField();
					studentsPanel.add(enterTimeTextField);
					enterTimeTextField.setBounds(259, 112, 140, 28);
				}
				{
					statusLabel = new JLabel();
					studentsPanel.add(statusLabel);
					statusLabel.setText("\u72b6\u6001\u7f16\u53f7");
					statusLabel.setBounds(196, 147, 63, 28);
				}
				{
					ComboBoxModel statusComboBoxModel = new DefaultComboBoxModel(
						new String[] { "在读", "休学","退学","毕业","其它" });
					statusComboBox = new JComboBox();
					studentsPanel.add(statusComboBox);
					statusComboBox.setModel(statusComboBoxModel);
					statusComboBox.setBounds(259, 154, 63, 28);
				}
				{
					remarkLabel = new JLabel();
					studentsPanel.add(remarkLabel);
					remarkLabel.setText("\u5907\u6ce8");
					remarkLabel.setBounds(371, 189, 63, 28);
				}
				{
					remarkScrollPane = new JScrollPane();
					studentsPanel.add(remarkScrollPane);
					remarkScrollPane.setBounds(406, 210, 77, 84);
					{
						remarkTextArea = new JTextArea();
						remarkScrollPane.setViewportView(remarkTextArea);
						remarkTextArea.setBounds(490, 210, 63, 84);
						remarkTextArea.setLineWrap(true);
					}
				}
				{
					photoLabel = new JLabel();
					studentsPanel.add(photoLabel);
					photoLabel.setText("\u7167\u7247");
					photoLabel.setBounds(448, 126, 63, 28);
				}
				{
					photoTextField = new JTextField();
					studentsPanel.add(photoTextField);
					photoTextField.setBounds(434, 14, 77, 105);
				}
				{
					infoLabel = new JLabel();
					studentsPanel.add(infoLabel);
					infoLabel.setText("\u4e2a\u4eba\u7b80\u4ecb");
					infoLabel.setBounds(196, 189, 63, 28);
				}
				{
					infoScrollPane = new JScrollPane();
					studentsPanel.add(infoScrollPane);
					infoScrollPane.setBounds(252, 203, 70, 77);
					{
						infoTextField = new JTextField();
						infoScrollPane.setViewportView(infoTextField);
						infoTextField.setBounds(308, 189, 63, 77);
					}
				}
				{
					addButton = new JButton();
					studentsPanel.add(addButton);
					addButton.setText("\u6dfb\u52a0");
					addButton.setBounds(280, 336, 70, 28);
				}
				{
					commitButton = new JButton();
					studentsPanel.add(commitButton);
					commitButton.setText("\u7f16\u8f91");
					commitButton.setBounds(357, 336, 70, 28);
				}
				{
					deleteButton = new JButton();
					studentsPanel.add(deleteButton);
					deleteButton.setText("\u5220\u9664");
					deleteButton.setBounds(434, 336, 70, 28);
				}
				{
					querButton = new JButton();
					studentsPanel.add(querButton);
					querButton.setText("\u67e5\u8be2");
					querButton.setBounds(511, 336, 70, 28);
				}
			}
			pack();
			this.setSize(600, 600);
		} catch (final Exception e) {
			e.printStackTrace();
		}
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -