how ? ok, simple..
1-just made new project
2- add JButton on the JPanel
3 - right click on JButton that we add before > choose "event" > "ActionPerformed"
4 - add this code above the TODO (as IDE will generate it default to made u code it faster)
String msg = "Hello dunia!"; JOptionPane.showMessageDialog(null,msg); System.out.println(msg)5 - now try execute by compiling it!
* I from Malaysia, thus text in picture are in Malay language
ok, look at the picture..thus code will popup a msg hello world!
hope u like it.. thanks.