File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Inputbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inputbox" Watch "Inputbox" New topic


Brian Cummins

Joined: Feb 24, 2005
Posts: 11
Hi. I have two questions about inputboxes:

1.Is there any way of changing the title from "input"?

2. Is there any way of exiting the procedure if the cancel button is pushed(without using try catch)?

Joel McNary

Joined: Aug 20, 2001
Posts: 1824

I'm afaird that you will have to be more specific about the type in input box that you are using. Java provides many capabilities with its dialog boxes; try looking that the javax.swing.JDialog class.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Brian Cummins

Joined: Feb 24, 2005
Posts: 11
I am using a JOptionPane

String input = JOptionPane.showInputDialog("Enter Value")
K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
Learn to use the API

showInputDialog(Component parentComponent, Object message, String title, int messageType)

[ March 04, 2005: Message edited by: Kashif Riaz ]
I agree. Here's the link:
subject: Inputbox
jQuery in Action, 3rd edition