This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes JDialogBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JDialogBox" Watch "JDialogBox" New topic


Ranch Hand

Joined: Sep 19, 2002
Posts: 34
Currently, i'm doing a project which require me to pop up a warning question when the button is clicked. but as i read through the information found on the java.sun website... i find them confusing.. n i admit my programming is bad. so... is there any way i can call upon a dialog box when a button'Delete' is being clicked.

SAE <br /> <br /><a href="" target="_blank" rel="nofollow"></a>
Sudharsan Govindarajan
Ranch Hand

Joined: Jul 03, 2002
Posts: 319
You can use the javax.swing.JOptionPane class for this. It has a number of static methods to display warning, message and confirmation dialogs. Have a look at the 'JOptionPane.showonfirmDialog' method.It may be useful for you.
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Welcome to the JavaRanch! Please adjust your display name to meet
the JavaRanch Naming Policy. You can change it here.
and welcome to the JavaRanch!
It is sorta covered in the JavaRanch Style Guide.
subject: JDialogBox