-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(setNewActivatedEntryAndUpdateDisplay): issue #507
- Loading branch information
1 parent
ef02f7c
commit 3e587db
Showing
3 changed files
with
50 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package playground; | ||
|
||
import javax.swing.*; | ||
import java.awt.event.ActionEvent; | ||
import java.awt.event.ActionListener; | ||
|
||
public class ButtonClickExample { | ||
public static void main(String[] args) { | ||
JFrame frame = new JFrame("Button Click Example"); | ||
JButton button = new JButton("Click Me"); | ||
|
||
// Add an event handler for the button click action | ||
button.addActionListener(new ActionListener() { | ||
@Override | ||
public void actionPerformed(ActionEvent e) { | ||
// This is the event handler method | ||
System.out.println("Button was clicked!"); | ||
} | ||
}); | ||
|
||
frame.add(button); | ||
frame.setSize(200, 200); | ||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | ||
frame.setVisible(true); | ||
} | ||
} | ||
|