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

📄 toolbar.java

📁 简单的书店管理系统,是课设期间教师指导完成的,希望会对大家有帮助!
💻 JAVA
字号:
package book;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JToolBar;
//工具条
public class ToolBar extends JToolBar{
	private JButton b,b1,b2,b3,b4,b5,b6,b7,b8;
	private ShowFrame show;
	MuBar bar;
  public ToolBar(MuBar bar){
	  this.bar=bar;
	 shezhi();
	 add();
  }
  void shezhi(){
	  show=new ShowFrame();
	b=new JButton("借阅图书");
	b.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
			show.showBorrowBook();
		}
		
	});
	
	b1=new JButton("归还图书");
	b1.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
			show.showReturnBook();
		}
		
	});
	
	b2=new JButton("数据备份");
	b2.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
		show.showDataManage();	
		}
		
	});
	
	b3=new JButton("用户管理");
	b3.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
			show.showUserManage();
		}
		
	});
	
	b4=new JButton("续借图书");
	b4.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
			show.showRenewalwBook();
		}
		
	});
	

	b5=new JButton("超期图书");
	b5.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
			show.showChaoTimeBook();
		}
		
	});
	
	b6=new JButton("滞纳设置");
	b6.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
			show.showLateFeeManage();
		}
		
	});
	
	b7=new JButton("帮助");
	b7.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
			
		}
		
	});
	
	b8=new JButton("关于");
	b8.addActionListener(new ActionListener(){
		public void actionPerformed(ActionEvent arg0) {
	  bar.setDialog();
		}
		
	});
  }
  
  void add(){
	  this.add(b);
	  this.add(b1);
	  addSeparator();
	  this.add(b2);
	  this.add(b3);
	  addSeparator();
	  this.add(b4);
	  this.add(b5);
	  this.add(b6);
	  addSeparator();
	  this.add(b7);
	  this.add(b8);
  }
  
}

⌨️ 快捷键说明

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