-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.java
More file actions
34 lines (26 loc) · 688 Bytes
/
Copy pathMenu.java
File metadata and controls
34 lines (26 loc) · 688 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
package january;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
public class Menu extends JFrame implements ActionListener {
private JButton btn;
public Menu() {
btn = new JButton("Next Window");
btn.addActionListener(this);
super.add(btn);
super.setTitle("Tic Tac Toe");
super.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
super.setExtendedState(MAXIMIZED_BOTH);
super.setVisible(true);
super.setSize(800, 500);
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if (e.getSource() == btn) {
dispose();
new TicTacToe();
}
}
}