-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain_screen.java
117 lines (97 loc) · 3 KB
/
Main_screen.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package Textbook_selling_system;
/**
*
* @author Soumyadip Chowdhury
* @github soumyadip007
*
*/
import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
public class Main_screen extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
private JPanel contentPane;
// MainScreen frame;
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Main_screen frame = new Main_screen();
frame.setTitle("");
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public Main_screen() {
setIconImage(Toolkit.getDefaultToolkit().getImage("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg"));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(450, 190, 1014, 597);
setResizable(false);
//contentPane.setTitle();
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel lblNewLabel = new JLabel("Book Hub");
lblNewLabel.setBackground(new Color(255, 200, 0));
lblNewLabel.setForeground(new Color(204, 255, 0));
lblNewLabel.setFont(new Font("Comic Sans MS", Font.PLAIN, 50));
lblNewLabel.setBounds(54, 0, 230, 98);
contentPane.add(lblNewLabel);
JButton AdminBtn = new JButton("Admin Login");
AdminBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
AdminBtn.setFont(new Font("Tahoma", Font.PLAIN, 32));
AdminBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
AdminLogin ad=new AdminLogin();
ad.setTitle("Book Hub");
ad.setVisible(true);
}
});
AdminBtn.setBounds(128, 245, 243, 93);
contentPane.add(AdminBtn);
JButton UserBtn = new JButton("User Login");
UserBtn.setFont(new Font("Tahoma", Font.PLAIN, 32));
UserBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
Userlogin ad=new Userlogin();
ad.setTitle("Book Hub");
ad.setVisible(true);
}
});
UserBtn.setBounds(647, 245, 243, 93);
contentPane.add(UserBtn);
JLabel lblBuySellRecycle = new JLabel("Buy Sell Recycle");
lblBuySellRecycle.setForeground(new Color(255, 255, 204));
lblBuySellRecycle.setFont(new Font("Sylfaen", Font.PLAIN, 28));
lblBuySellRecycle.setBounds(136, 52, 431, 86);
contentPane.add(lblBuySellRecycle);
JLabel lblNewLabel_1 = new JLabel("");
lblNewLabel_1.setIcon(new ImageIcon("C:\\Users\\Soumyadeep\\Desktop\\Book Hub\\0 (Custom).jpg"));
lblNewLabel_1.setBounds(0, 0, 1008, 562);
contentPane.add(lblNewLabel_1);
}
}