-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRecieption.java
More file actions
85 lines (84 loc) · 3 KB
/
Recieption.java
File metadata and controls
85 lines (84 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package hospital_management;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.util.logging.*;
public class Recieption extends JFrame {
private JPanel pan = new JPanel();
private JButton patient = new JButton("PATIENT");
private JButton createChanel = new JButton("Create Chanel");
private JButton viewDoctor = new JButton("View Doctor");
private JButton apoint = new JButton("view appintment");
private JButton viewInventory = new JButton("viewInventory");
private JButton logOut = new JButton("LOGOUT");
private JPanel ta = new JPanel();
private JPanel main = new JPanel();
Recieption(){
JLabel imageLabel = new JLabel();
ImageIcon imageIcon = new ImageIcon("C://Users/Hirut Tarekegn/Desktop/javaproject1/images (3).jfif");
// Set the image icon to the JLabel
imageLabel.setIcon(imageIcon);
main.setLayout(new GridLayout(1,2,5,6));
ta.add(imageLabel);
pan.setLayout(null);
patient.setBounds(10, 45, 120, 25);
createChanel.setBounds(10, 75, 120, 25);
viewDoctor.setBounds(10, 105, 120, 25);
apoint.setBounds(10, 135, 120, 25);
viewInventory.setBounds(10, 165, 120, 25);
logOut.setBounds(10, 195, 120, 25);
pan.setBackground(Color.pink);
pan.add(patient);
pan.add(createChanel);
pan.add(viewDoctor);
pan.add(apoint);
pan.add(viewInventory);
pan.add(logOut);
main.add(pan);
main.add(ta);
patient.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
PatientRegistrationForm rf= new PatientRegistrationForm();
rf.setVisible(true);
setVisible(false);
}
});
viewInventory.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new ViewInventory();
setVisible(false);
}
});
apoint.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new View_appointment();
setVisible(false);
}
});
createChanel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new Create_NewChannel();
setVisible(false);
}
});
viewDoctor.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new DoctorList();
setVisible(false);
}
});
logOut.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Hospital_Management hm= new Hospital_Management();
setVisible(false);
}
});
add(main);
setSize(400, 350);
setVisible(true);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void a(){}
}