Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2006

Tip: Looking for answers? Try searching our database.

suggestions?

Thread view: 
gaetanoortisi@yahoo.it - 12 Mar 2006 22:34 GMT
Hello,
I have to get euro prices in a dialog.
My solution would be a text field initially filled only with an euro
sign (undeleble) that
accept only digits, an optional comma and optional 1 or 2 digits for
cents.
Even if the field is left blank, I want to check all data (there are
also other components)
when the user push an OK button.
How can I do this? I am a bit confusing with JFormattedTextFields,
JTextFields,
NumberFormat and DecimalFormat classes.
Thanks,
                      Gaetano
Oliver Wong - 13 Mar 2006 21:47 GMT
> Hello,
> I have to get euro prices in a dialog.
[quoted text clipped - 9 lines]
> NumberFormat and DecimalFormat classes.
> Thanks,

   See
http://java.sun.com/docs/books/tutorial/uiswing/components/formattedtextfield.html

   They cover this problem, except they use the $ character rather than the
euro symbol, and the $ character is deletable, but automatically gets
reinserted when the text field loses focus.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.