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

📄 studentframe.java

📁 一个学籍管理系统。
💻 JAVA
字号:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

/*
 * Created on 2004-6-1
 */

/**
 * @author Administrator
 */
public class StudentFrame extends JInternalFrame {

	//private javax.swing.JPanel jContentPane = null;  //  @jve:visual-info  decl-index=0 visual-constraint="31,35"

	private javax.swing.JSplitPane jSplitPane = null;
	private javax.swing.JButton jButton = null;
	private javax.swing.JPanel jPanel = null;
	private javax.swing.JButton jButton1 = null;
	private javax.swing.JButton jButton2 = null;
	private javax.swing.JLabel jLabel = null;
	private javax.swing.JLabel jLabel1 = null;
	private javax.swing.JLabel jLabel2 = null;
	private javax.swing.JLabel jLabel3 = null;
	private javax.swing.JButton jButton3 = null;
	private javax.swing.JLabel jLabel4 = null;
	private javax.swing.JButton jButton4 = null;
	private javax.swing.JButton jButton5 = null;
	private javax.swing.JLabel jLabel5 = null;
	/**
	 * This is the default constructor
	 */
	public StudentFrame()
	 {
		super();
		initialize();
	}
	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize()
	{
		this.setContentPane(getJSplitPane());
		this.setSize(712, 483);
		this.setVisible(true);
		this.setTitle("Student Manage");
		jSplitPane=getJSplitPane();
		this.getContentPane().add(jSplitPane);
		
	}

	/**
	 * This method initializes jSplitPane
	 * 
	 * @return javax.swing.JSplitPane
	 */
	private javax.swing.JSplitPane getJSplitPane() {
		if(jSplitPane == null) {
			jSplitPane = new javax.swing.JSplitPane();
			jSplitPane.setRightComponent(getJButton2());
			jSplitPane.setLeftComponent(getJPanel());
			jSplitPane.setPreferredSize(new java.awt.Dimension(700,450));
			jSplitPane.setDividerSize(10);
			jSplitPane.setDividerLocation(180);
			jSplitPane.setVisible(true);
			jSplitPane.setContinuousLayout(false);
			jSplitPane.setToolTipText("Student Manage Page");
		}
		return jSplitPane;
	}
	
	/**
	 * This method initializes jButton
	 * 
	 * @return javax.swing.JButton
	 */
	private javax.swing.JButton getJButton2() {
		if(jButton == null) {
			jButton = new javax.swing.JButton();
		}
		return jButton;
	}
	/**
	 * This method initializes jPanel
	 * 
	 * @return javax.swing.JPanel
	 */
	private javax.swing.JPanel getJPanel() {
		if(jPanel == null) {
			jPanel = new javax.swing.JPanel();
			jPanel.setLayout(new java.awt.FlowLayout());
			jPanel.add(getJLabel1(), null);
			jPanel.add(getJLabel(), null);
			jPanel.add(getJLabel2(), null);
			jPanel.add(getJLabel3(), null);
			jPanel.add(getJButton1(), null);
			jPanel.add(getJButton22(), null);
			jPanel.add(getJButton3(), null);
			jPanel.add(getJLabel4(), null);
			jPanel.add(getJButton4(), null);
			jPanel.add(getJButton5(), null);
			jPanel.add(getJLabel5(), null);
		}
		return jPanel;
	}
	/**
	 * This method initializes jButton1
	 * 
	 * @return javax.swing.JButton
	 */
	private javax.swing.JButton getJButton1() {
		if(jButton1 == null) {
			jButton1 = new javax.swing.JButton();
			jButton1.setText("All Student");
			jButton1.setName("jButton1");
			jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/student.gif")));
			jButton1.setToolTipText("Show All Student Information");
		}
		return jButton1;
	}
	/**
	 * This method initializes jButton2
	 * 
	 * @return javax.swing.JButton
	 */
	private javax.swing.JButton getJButton22() {
		if(jButton2 == null) {
			jButton2 = new javax.swing.JButton();
			jButton2.setText("All Teacher");
			jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/teacher.gif")));
			jButton2.setToolTipText("Show All Teacher Information");
		}
		return jButton2;
	}
	/**
	 * This method initializes jLabel
	 * 
	 * @return javax.swing.JLabel
	 */
	private javax.swing.JLabel getJLabel() {
		if(jLabel == null) {
			jLabel = new javax.swing.JLabel();
			jLabel.setText("Student Menu");
			jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 18));
			jLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/fav.gif")));
		}
		return jLabel;
	}
	/**
	 * This method initializes jLabel1
	 * 
	 * @return javax.swing.JLabel
	 */
	private javax.swing.JLabel getJLabel1() {
		if(jLabel1 == null) {
			jLabel1 = new javax.swing.JLabel();
			jLabel1.setText("              ");
		}
		return jLabel1;
	}
	/**
	 * This method initializes jLabel2
	 * 
	 * @return javax.swing.JLabel
	 */
	private javax.swing.JLabel getJLabel2() {
		if(jLabel2 == null) {
			jLabel2 = new javax.swing.JLabel();
			jLabel2.setText("                           ");
			jLabel2.setName("");
			jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
		}
		return jLabel2;
	}
	/**
	 * This method initializes jLabel3
	 * 
	 * @return javax.swing.JLabel
	 */
	private javax.swing.JLabel getJLabel3() {
		if(jLabel3 == null) {
			jLabel3 = new javax.swing.JLabel();
			jLabel3.setText("Information                     ");
			jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/information.GIF")));
		}
		return jLabel3;
	}
	/**
	 * This method initializes jButton3
	 * 
	 * @return javax.swing.JButton
	 */
	private javax.swing.JButton getJButton3() {
		if(jButton3 == null) {
			jButton3 = new javax.swing.JButton();
			jButton3.setText("My Info......");
			jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/username.gif")));
		}
		return jButton3;
	}
	/**
	 * This method initializes jLabel4
	 * 
	 * @return javax.swing.JLabel
	 */
	private javax.swing.JLabel getJLabel4() {
		if(jLabel4 == null) {
			jLabel4 = new javax.swing.JLabel();
			jLabel4.setText("Functions                       ");
			jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/wrench.gif")));
		}
		return jLabel4;
	}
	/**
	 * This method initializes jButton4
	 * 
	 * @return javax.swing.JButton
	 */
	private javax.swing.JButton getJButton4() {
		if(jButton4 == null) {
			jButton4 = new javax.swing.JButton();
			jButton4.setText("Set Teacher");
			jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/admin.gif")));
		}
		return jButton4;
	}
	/**
	 * This method initializes jButton5
	 * 
	 * @return javax.swing.JButton
	 */
	private javax.swing.JButton getJButton5() {
		if(jButton5 == null) {
			jButton5 = new javax.swing.JButton();
			jButton5.setText("Set Depart ");
			jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/inboxnonew.gif")));
		}
		return jButton5;
	}
	/**
	 * This method initializes jLabel5
	 * 
	 * @return javax.swing.JLabel
	 */
	private javax.swing.JLabel getJLabel5() {
		if(jLabel5 == null) {
			jLabel5 = new javax.swing.JLabel();
			jLabel5.setText("State Display                  ");
			jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/icon_16.gif")));
		}
		return jLabel5;
	}
	public static void main(String args[])
	{
		StudentFrame frame=new StudentFrame();
		frame.initialize();
	}
}  //  @jve:visual-info  decl-index=0 visual-constraint="13,11"

⌨️ 快捷键说明

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