WinAPI MessageBox in Java

I am looking for a quick and dirty way in Java to release a message box to the user to return when they click OK. This is for the termination condition of the application, so I'm really not interested about here, about the JFrame max, and everything else. The MessageBox feature in the Windows API is exactly what I want, except that I'm stuck in Javaland. Any recommendations for similar features?

Edit: Now that I come up with this, how the hell are you leaving the Java application? The only way I've ever managed to close mine is to make a JFrame and have EXIT_ON_CLOSE.

Edit: succeeded.

+4
source share
3 answers

You can use:

JOptionPane.showMessageDialog(null, "blah blah blah"); 

it shows a message box oriented relative to the screen with the ok button

+6
source
+3
source

Security issues make your own dialogue (rather than systemic) the best solution.

//edit
"own dialogue" - I meant a dialog box that runs on a virtual machine

-2
source

All Articles