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

📄 master.java

📁 医院管理系统 压缩包内有比较详尽的安装演示与功能介绍 大家可以放心下载
💻 JAVA
字号:
package src;

import java.awt.BorderLayout;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import src.SwingResourceManager;

import java.awt.Color;
import java.awt.GraphicsConfiguration;
import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;

public class Master extends JFrame implements ActionListener {

	private JPanel jContentPane = null;

	public Master() throws HeadlessException {
		 super("医院住院处管理系统");
		 
		 JFrame.setDefaultLookAndFeelDecorated(true);
		// TODO Auto-generated constructor stub
		initialize();
	}

	public Master(GraphicsConfiguration arg0) {
		super(arg0);
		// TODO Auto-generated constructor stub
		initialize();
	}

	public Master(String arg0) throws HeadlessException {
		super(arg0);
		// TODO Auto-generated constructor stub
		initialize();
	}

	public Master(String arg0, GraphicsConfiguration arg1) {
		super(arg0, arg1);
		// TODO Auto-generated constructor stub
		initialize();
	}

	public void actionPerformed(ActionEvent event) {
		// TODO Auto-generated method stub
		String cmd = event.getActionCommand();
	    if(cmd=="临时工作站"){
	    	System.out.println("临时工作站");
	    	new clinicBed();
	    //	new tempWorkstation();
	      }
	    if(cmd=="科室会诊"){
	    	System.out.println("科室会诊");
	    	KeShiHuiZhen consu = new KeShiHuiZhen();
			consu.setVisible(true);
	      }
	    if(cmd=="费用管理"){
	    	System.out.println("费用管理");	
	    	FeeManager fee=new FeeManager();
	    	fee.setVisible(true);
	      }
	    if(cmd=="医嘱处理"){
	    	System.out.println("医嘱处理");
	       // new docManage();
	    	DoctorAdvice frame = new DoctorAdvice();
			frame.setVisible(true);
	      }
	    if(cmd=="发药单查询"){
	    	System.out.println("发药单查询");
	    	new MainMedList();
	      }
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		JFrame.setDefaultLookAndFeelDecorated(true);
		Master master=new Master();
		
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		
		  setLocation(200,150);
		  setSize(650,450);
		  setResizable(false);
		  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		  //modify title image
			ImageIcon title=new ImageIcon("images/pill.gif");
			setIconImage(SwingResourceManager.getImage(Master.class, "images/pill.gif"));
		  //add top image
		  JPanel jp=new JPanel();
		  jp.add(new JLabel(new ImageIcon("images/head2.gif")));

		  add("North",jp);
		  JPanel jp0=new JPanel();
		  jp0.setBorder(BorderFactory.createBevelBorder(1,new Color(45,92,162),
		                new Color(43,66,97),new Color(45,92,162),new Color(84,123,200)));
		  //add hospital image
		  jp0.setLayout(new BorderLayout());
		  ImageIcon icon=new ImageIcon("images/outlook.jpg");
		  JLabel background=new JLabel(SwingResourceManager.getIcon(Master.class, "images/outlook.jpg"),JLabel.CENTER);
		  jp0.add("Center",background);
		  //add 5 button
		  JPanel jp1=new JPanel(new GridLayout(5,1));
		  JButton tempWorkstation=new JButton("临时工作站");
		  tempWorkstation.addActionListener(this);
		  tempWorkstation.setForeground(new Color(255,128,0));
		  JButton NurseFinding=new JButton("科室会诊");
		  NurseFinding.addActionListener(this);
		  NurseFinding.setForeground(new Color(255,128,0));
		  JButton TempWork=new JButton("费用管理");
		  TempWork.addActionListener(this);
		  TempWork.setForeground(new Color(255,128,0));
		  JButton DocManage=new JButton("医嘱处理");
		  DocManage.addActionListener(this);
		  DocManage.setForeground(new Color(255,128,0));
		  JButton FeeManage=new JButton("发药单查询");
		  FeeManage.addActionListener(this);
		  FeeManage.setForeground(new Color(255,128,0));

		  jp1.add(tempWorkstation);
		  jp1.add(NurseFinding);
		  jp1.add(TempWork);
		  jp1.add(DocManage);
		  jp1.add(FeeManage);

		  jp0.add("East",jp1);
		  add(jp0);
		  setVisible(true);
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jContentPane = new JPanel();
			jContentPane.setLayout(new BorderLayout());
		}
		return jContentPane;
	}

}  //  @jve:decl-index=0:visual-constraint="26,123"

⌨️ 快捷键说明

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