Re: Can JOptionPane use a MaskFormatter for data input
- From: Michael Rauscher <michlmann@xxxxxx>
- Date: Wed, 27 Sep 2006 18:23:46 +0200
Deniz Dogan schrieb:
dcMan wrote:I would like to have a dialog box that prompts the user for an IP
address. Is there a way to use JOptionPane, but have the data entry
text box restrict the input to be ###.###.###.###?
Thanks
Greg
I haven't got an answer, in fact I'm bumping this one, because I need to know the same thing. There SHOULD be such a thing I reckon, this is Java after all. ;-)
You may use a JFormattedTextField (using a MaskFormatter) and you may further use this text field as message parameter to call any of the JOptionPane.showXXXDialog methods.
Instead of using JOptionPane you can of course use a JDialog, too.
Bye
Michael
.
- Follow-Ups:
- References:
- Can JOptionPane use a MaskFormatter for data input
- From: dcMan
- Re: Can JOptionPane use a MaskFormatter for data input
- From: Deniz Dogan
- Can JOptionPane use a MaskFormatter for data input
- Prev by Date: Re: Noddy layout question!
- Next by Date: Re: Can JOptionPane use a MaskFormatter for data input
- Previous by thread: Re: Can JOptionPane use a MaskFormatter for data input
- Next by thread: Re: Can JOptionPane use a MaskFormatter for data input
- Index(es):
Relevant Pages
|