COMP2396
Loading...
Searching...
No Matches
SimpleGUI2 Class Reference
Inheritance diagram for SimpleGUI2:
Collaboration diagram for SimpleGUI2:

Public Member Functions

void actionPerformed (ActionEvent event)
 
void go ()
 

Static Public Member Functions

static void main (String[] args)
 

Detailed Description

Definition at line 4 of file SimpleGUI2.java.

Member Function Documentation

◆ actionPerformed()

void SimpleGUI2.actionPerformed ( ActionEvent event)
inline

Definition at line 21 of file SimpleGUI2.java.

21 {
22 button.setText("I've been clicked!");
23 }

◆ go()

void SimpleGUI2.go ( )
inline

Definition at line 11 of file SimpleGUI2.java.

11 {
12 JFrame frame = new JFrame();
13 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
14 button = new JButton("click me");
15 button.addActionListener(this);
16 frame.add(button);
17 frame.setSize(300, 300);
18 frame.setVisible(true);
19 }

Referenced by main().

Here is the caller graph for this function:

◆ main()

static void SimpleGUI2.main ( String[] args)
inlinestatic

Definition at line 6 of file SimpleGUI2.java.

6 {
7 SimpleGUI2 gui = new SimpleGUI2();
8 gui.go();
9 }

References go().

Here is the call graph for this function:

The documentation for this class was generated from the following file: