Reputation: 14109
What's the Java Swing counterpart for the JavaScript alert()
popup (if there is one)?
Upvotes: 2
Views: 5554
Reputation: 24124
How to create a dialog box in Java:
Upvotes: 2
Reputation: 39197
An basic way to accomplish such a popup is to use JOptionPane.showMessageDialog
, see here.
JOptionPane.showMessageDialog(frame, "here comes the text.");
// assumes frame to be a reference to the desired parent frame
Upvotes: 7
Reputation: 4446
Think you are looking for JOptionPanes but here is a good description of the different dialogs: http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html
Upvotes: 2