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

📄 2.学生界面.txt

📁 本系统是基于JBuilder和SQL2000开发的
💻 TXT
字号:
package library;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.JButton;
import java.awt.GridBagLayout;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
import javax.swing.JLabel;
import java.awt.Font;

public class Frame2 extends JFrame
{
    JPanel contentPane;
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JButton jButton3 = new JButton();
    XYLayout xYLayout1 = new XYLayout();
    JButton jButton4 = new JButton();
    JLabel jLabel1 = new JLabel();
    public Frame2()
    {
        try
        {
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            jbInit();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

 private void jbInit() throws Exception {
        contentPane = (JPanel) getContentPane();
        contentPane.setLayout(xYLayout1);
        setSize(new Dimension(400, 120));
        setTitle("读者界面");
        jButton1.setText("查询");
        jButton1.addActionListener(new Frame2_jButton1_actionAdapter(this));
        jButton2.setText("借书");
        jButton2.addActionListener(new Frame2_jButton2_actionAdapter(this));
        jButton3.setText("还书");
        jButton3.addActionListener(new Frame2_jButton3_actionAdapter(this));
        jButton4.setText("修改密码");
        jButton4.addActionListener(new Frame2_jButton4_actionAdapter(this));
        jLabel1.setFont(new java.awt.Font("微软雅黑", Font.BOLD, 25));
        jLabel1.setText("欢迎使用");
        contentPane.add(jButton1, new XYConstraints(32, 11, -1, -1));
        contentPane.add(jButton2, new XYConstraints(120, 11, -1, -1));
        contentPane.add(jButton3, new XYConstraints(205, 12, -1, -1));
        contentPane.add(jButton4, new XYConstraints(291, 11, -1, -1));
        contentPane.add(jLabel1, new XYConstraints(139, 43, 114, 36));
    }

    public void jButton1_actionPerformed(ActionEvent e)
    {
        Frame3 f=new Frame3();
        f.setVisible(true);
    }

    public void jButton2_actionPerformed(ActionEvent e)
    {
      Frame4 f=new Frame4();
      f.setVisible(true);
    }

    public void jButton3_actionPerformed(ActionEvent e)
    {
        Frame5 f=new Frame5();
        f.setVisible(true);
    }

    public void jButton4_actionPerformed(ActionEvent e)
    {
        Frame6 f=new Frame6();
        f.setVisible(true);
    }
}

class Frame2_jButton4_actionAdapter implements ActionListener
{
    private Frame2 adaptee;
    Frame2_jButton4_actionAdapter(Frame2 adaptee) {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e)
    {
        adaptee.jButton4_actionPerformed(e);
    }
}

class Frame2_jButton3_actionAdapter implements ActionListener
{
    private Frame2 adaptee;
    Frame2_jButton3_actionAdapter(Frame2 adaptee)
    {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e)
    {
        adaptee.jButton3_actionPerformed(e);
    }
}

class Frame2_jButton2_actionAdapter implements ActionListener
{
    private Frame2 adaptee;
    Frame2_jButton2_actionAdapter(Frame2 adaptee)
    {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e)
    {
        adaptee.jButton2_actionPerformed(e);
    }
}

class Frame2_jButton1_actionAdapter implements ActionListener
{
    private Frame2 adaptee;
    Frame2_jButton1_actionAdapter(Frame2 adaptee)
    {
        this.adaptee = adaptee;
    }

    public void actionPerformed(ActionEvent e)
    {
        adaptee.jButton1_actionPerformed(e);
    }
}

⌨️ 快捷键说明

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