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

📄 diagnoseregister.java

📁 宠物医院管理系统 包含宠物的注册 管理 收费 诊断等一系列过程控制 还包含配应的数据库 Jar包
💻 JAVA
字号:
package yd.pethospital.diagnoseregister.view;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import yd.pethospital.diagnose.jdbc.*;

public	class DiagnoseRegister {

	public static JFrame frame;
	public static JTable BTCK;                    //表格
	public static JButton BAdd,BDel, BBack;       //增加 删除 返回 按钮
	public static int Mess;
	JLabel LTitle;                                 //标题 标签
	
	public DiagnoseRegister(){       
	
		frame=new JFrame();                        //设置窗体
		frame.setBounds(180, 100, 740, 500);        //位置 大小 不可改变大小 空布局 标题  
		frame.setResizable(false);                                        
		frame.setLayout(null);  
		frame.setTitle("诊断登记");
		frame.validate();
		
		new DiagnoseCommon();
		
		LTitle=new JLabel("诊断登记");                      //设置标题标签                   
		LTitle.setFont(new Font(null,Font.TYPE1_FONT,28));     
		LTitle.setBounds(330,15,120,40);                          
		
		RegisterGet Reget=new RegisterGet();
		BTCK=new JTable(Reget);                            //创建 设置表格
		JScrollPane JSPane=new JScrollPane(BTCK);           
		JSPane.setBounds(80,50,600,360);     
		BTCK.setVisible(true);
		
		BTCK.addMouseListener(new MouseListener(){          //添加表格的监听器

			public void mouseClicked(MouseEvent e) {
				
				if(e.getClickCount()==2){                   //双击表格事件
					
					new ChangeDiagnose();
					ChangeDiagnoseGet.GetText();
					frame.dispose();
				}
			}

			public void mouseEntered(MouseEvent arg0) {}
			public void mouseExited(MouseEvent arg0) {}
			public void mousePressed(MouseEvent arg0) {}
			public void mouseReleased(MouseEvent arg0) {}
			
		});
		
		BAdd=new JButton("新增");                          
		BDel=new JButton("删除");
		BBack=new JButton("返回");
		                                                   
		BAdd.setBounds(160,420,70,30);                      //新增按钮
		BAdd.setFont(new Font(null,Font.BOLD,14));
		
		BDel.setBounds(320,420,70,30);                      //删除按钮
		BDel.setFont(new Font(null,Font.BOLD,14));
		
		BBack.setBounds(480,420,70,30);                     //返回按钮
		BBack.setFont(new Font(null,Font.BOLD,14));
		
		frame.add(BAdd);
		BAdd.addActionListener(new ActionListener(){       //添加新增按钮 监听器

			public void actionPerformed(ActionEvent arg0) {
				
				new NewDiagnose();
				frame.dispose();
			}
			
		});
		
		
		frame.add(BDel);    
		
		BDel.addActionListener(new ActionListener(){       //添加删除按钮 监听器

			public void actionPerformed(ActionEvent arg0) {
				
				Mess=JOptionPane.showConfirmDialog(null, "确认是否删除所选信息?", "系统信息提示", JOptionPane.YES_NO_OPTION);
				
				if(Mess==JOptionPane.YES_OPTION){
					
					new DeleteDiagnose();
				}
				
			}
			
		});
		
		frame.add(BBack);
		
		BBack.addActionListener(new ActionListener(){                 //添加返回 监听器

			public void actionPerformed(ActionEvent arg0) {
						
				frame.dispose();			
			}
					
		});				             
		
		frame.add(LTitle);
		frame.add(JSPane);
		
		frame.setVisible(true);
			
	}
		
}
	

⌨️ 快捷键说明

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