-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathgui.java
38 lines (25 loc) · 806 Bytes
/
gui.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
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class gui extends JFrame {
private boolean booleanToChange = false;
private JButton exampleButton;
public gui() {
exampleButton = new JButton();
exampleButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
//Access a member in anonymous class
gui.this.booleanToChange = true;
}
});
}
}