java学籍管理系统部分代码_java学籍管理系统源代码

这个博客展示了如何使用Java创建一个学籍管理系统的操作界面,包括基本信息录入、修改、查询和删除等功能。代码中实现了窗口布局、按钮事件监听以及菜单栏的操作选项。
摘要由CSDN通过智能技术生成

41528d3028836879cd698677c3999917.gifjava学籍管理系统源代码

package zuoye; //主类 import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.Hashtable; public class ManagerWindow extends JFrame implements ActionListener { Student 基本信息录入=null; ModifySituation 基本信息修改=null; Inquest 基本信息查询=null; Delete 基本信息删除=null; JPanel pCenter,p,p9; TextField txtName,txtPassword; Label lblTitle,lblName,lblPassword; Button btn,btnReset,guanbi; Panel p1,p11,p12,p2,p13,p14,p15; JMenuBar bar; ImageIcon icon; JMenu fileMenu; JMenuItem 录入,修改,查询,删除,欢迎,退出,关于; Container con=null; Hashtable 基本信息=null; File file=null; CardLayout card=null; JLabel label=null; JLabel label2; public ManagerWindow() { p=new JPanel(); lblName=new Label(“管理员帐号:“); txtName=new TextField(10); lblPassword=new Label(“密 码:“); txtPassword=new TextField(10); txtPassword.setEchoChar( * ); btn = new Button(“提交“); btnReset = new Button(“重置“); guanbi=new Button(“关闭“); p11=new Panel(); p12=new Panel(); p13=new Panel(); p14=new Panel(); p15=new Panel(); p11.add(lblName); p11.add(txtName); p12.add(lblPassword); p12.add(txtPassword); txtName.addActionListener(this); txtPassword.addActionListener(this); p13.add(btn); btn.setBackground(Color.YELLOW); p13.add(btnReset); btnReset.setBackground(Color.YELLOW); p13.add(guanbi); guanbi.setBackground(Color.YELLOW); btn.addActionListener(this); btnReset.addActionListener(this); guanbi.addActionListener(this); p.setLayout(new GridLayout(10,1)); p.add(p14); p.add(p15); p.add(p11); p.add(p12); p.add(p13); p.setBackground(Color.gray); p9=new JPanel(); icon=new ImageIcon(“123.jpg“); label2=new JLabel(icon,JLabel.LEFT); label=new JLabel(“欢迎使用学生基本信息管理系统“,JLabel.CENTER); label.setFont(new Font(“TimesRoman“,Font.BOLD,24)); label.setForeground(Color.red); p9.setOpaque(true); p9.add(label); p9.add(label2); 录入=new JMenuItem(“录入学生基本信息“); 修改=new JMenuItem(“修改学生基本信息“); 查询=new JMenuItem(“查询学生基本信息“); 删除=new JMenuItem(“删除学生基本信息“); 欢迎=new JMenuItem(“欢迎界面“); 退出=new JMenuItem(“退出“); 关于=new JMenuItem(“关于我们“); bar=new JMenuBar(); fileMenu=new JMenu(“菜单选项“); fileMenu.add(录入); fileMenu.add(修改); fileMenu.add(查询); fileMenu.add(删除); fileMenu.add(欢迎); fileMenu.add(关于); fileMenu.add(退出); fileMenu.enable(false); bar.add(fileMenu); setJMenuBar(bar); 基本信息=new Hashtable(); 录入.addActionListener(this); 修改.addActionListener(this); 查询.addActionListener(this); 删除.addActionListener(this); 欢迎.addActionListener(this); 退出.addActionListen

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值