-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI.java
More file actions
34 lines (26 loc) · 884 Bytes
/
Copy pathGUI.java
File metadata and controls
34 lines (26 loc) · 884 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
32
33
34
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class GUI extends JFrame implements ActionListener {
private LoginSignupApp app;
private Menu guiComponents;
private Logic logic;
public GUI(LoginSignupApp app) {
this.app = app;
setTitle("DORSU Laptop Rental");
setSize(400, 300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setResizable(false);
guiComponents = new Menu(this, new Logic(guiComponents), app);
setVisible(false);
}
public void showGUIComponents() {
guiComponents = new Menu(this, new Logic(guiComponents), app);
setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
logic.handleAction(e);
}
}