instructions.java~5~
来自「学生信息管理系统,包括成绩查询,成绩排序,用ACCESS做数据库连接」· JAVA~5~ 代码 · 共 60 行
JAVA~5~
60 行
package Chapter1;import java.io.*;import javax.swing.*;import java.awt.*;import java.awt.event.*;import java.sql.*;import java.awt.Rectangle;import java.awt.Font;public class Instructions extends JFrame implements ActionListener{ public static final int WIDTH=400; public static final int HEIGHT=400; JLabel jLabel1 = new JLabel(); JButton jButton1 = new JButton(); public Instructions() { setSize(WIDTH,HEIGHT); setTitle("使用说明"); Container contentPane=getContentPane(); contentPane.setBackground(Color.green); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("返回")) { this.setVisible(false); ManagerInterface n1= new ManagerInterface(); StudentInterface n2=new StudentInterface(); if(Login.jComboBox1.getSelectedIndex()==0) { n1.setVisible(true); n2.setVisible(false);} else if(Login.jComboBox1.getSelectedIndex()==1) { n2.setVisible(true); n1.setVisible(false); } } } public static void main(String[] args) { Instructions n=new Instructions(); n.setVisible(true); } private void jbInit() throws Exception { jLabel1.setFont(new java.awt.Font("Dialog", 1, 13)); jLabel1.setRequestFocusEnabled(true); jLabel1.setText("此系统用于管理学生信息,包括学生信息的输入和查询等功能!"); jLabel1.setBounds(new Rectangle(8, 56, 376, 152)); this.getContentPane().setLayout(null); jButton1.setBounds(new Rectangle(169, 242, 73, 25)); jButton1.setFont(new java.awt.Font("Dialog", 1, 13)); jButton1.setText("返回"); this.getContentPane().add(jLabel1, null); this.getContentPane().add(jButton1, null); jButton1.addActionListener(this); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?