-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogoScreen.java
More file actions
31 lines (24 loc) · 776 Bytes
/
Copy pathLogoScreen.java
File metadata and controls
31 lines (24 loc) · 776 Bytes
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
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JFrame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class LogoScreen extends JFrame implements ActionListener {
private JButton logo;
public LogoScreen() {
logo = new JButton();
logo.setBorderPainted(false);
logo.addActionListener(this);
ImageIcon image = new ImageIcon("SensoLogo.jpg");
logo.setIcon(image); //initialise and add total sales label
add(logo);
}
public void actionPerformed(ActionEvent event) {
Login login = new Login();
login.setTitle("Senso Register");
login.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
login.setBounds(0, 0, 700, 600);
login.setVisible(true);
}
}