-
Notifications
You must be signed in to change notification settings - Fork 0
/
PreHome.java
89 lines (76 loc) · 3.34 KB
/
PreHome.java
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
86
87
88
89
package medicaldiagnose;
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class PreHome extends JFrame {
public PreHome() {
initComponents();
}
private void initComponents() {
getContentPane().setBounds(100,100,500,500);
jLabel3 = new JLabel();
jButton1 = new JButton();
jButton2 = new JButton();
jLabel2 = new JLabel();
jLabel1 = new JLabel();
jLabel3.setText("jLabel3");
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
// getContentPane().setLayout(null);
getContentPane().setSize(100,100);
jButton1.setBackground(java.awt.SystemColor.inactiveCaption);
jButton1.setFont(new java.awt.Font("Courier New", 1, 36)); // NOI18N
jButton1.setForeground(new java.awt.Color(255, 0, 0));
jButton1.setIcon(new ImageIcon("C:\\Users\\Ayesha Zaka\\Downloads\\1st Semester\\New folder (2)\\patient.png")); // NOI18N
jButton1.setText("USER");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
getContentPane().add(jButton1);
jButton1.setBounds(30, 170, 290, 230);
jButton2.setBackground(java.awt.SystemColor.inactiveCaption);
jButton2.setFont(new java.awt.Font("Courier New", 1, 36)); // NOI18N
jButton2.setForeground(new java.awt.Color(255, 0, 51));
jButton2.setIcon(new ImageIcon("C:\\Users\\Ayesha Zaka\\Downloads\\1st Semester\\New folder (2)\\user_login-512.png")); // NOI18N
jButton2.setText("ADMIN");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
getContentPane().add(jButton2);
jButton2.setBounds(400, 170, 300, 230);
jLabel2.setFont(new java.awt.Font("Droid Sans", 1, 36)); // NOI18N
jLabel2.setText("SELECT YOUR CHOICE");
getContentPane().add(jLabel2);
jLabel2.setBounds(170, 50, 380, 80);
jLabel1.setIcon(new ImageIcon("C:\\Users\\Ayesha Zaka\\Downloads\\1st Semester\\New folder (2)\\Darshboard-Login1.png")); // NOI18N
getContentPane().add(jLabel1);
jLabel1.setBounds(0, 0, 730, 480);
pack();
}// </editor-fold>
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
UserDashboard obj = new UserDashboard();
obj.setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
Login obj = new Login();
obj.setVisible(true);
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new PreHome().setVisible(true);
}
});
}
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
}