File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How do I use a popup box in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do I use a popup box in Java?" Watch "How do I use a popup box in Java?" New topic
Author

How do I use a popup box in Java?

Thomas Knight
Ranch Hand

Joined: Feb 08, 2003
Posts: 33
I am sure that Java must have something equvilant to VBs input box, where a pop up box appears after some action and there is a textfield where the user can type some text. I looked in the list of Swing components and did not find anything off hand, anybody know? I want to be able to take what the user types in this popup box and use it in my code for processing. Thanks.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Thomas,
Take a look at JOptionPane and JDialog. JOptionPane provides a variety of static methods to create popup dialogs on the fly.
Michael Morris


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
A simple example of what Michael was talking about:


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I use a popup box in Java?