Results 1 to 2 of 2
  1. #1
    Dcalladi is offline Member
    Join Date
    Oct 2011
    Posts
    27
    Rep Power
    0

    Default JFormattedTextField and Currency

    Hi,
    I am lookingfor a way with either a Jformattedtextfield or just a regular textfield to apply a mask to allow someone to enter an amount of cash exmples are 123.45, 12.34, 1.23 this means it allows a maximum of three digits but a minimum of 1 digit before the . and then only two after the . but the user does not need to enter the dot themselves.

    can i do this with a JFormattedTextField or a normal TextField or would i have to write a seperate method to control this but have a mask with just a dot in it.

    Thank you in advance

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Moderator
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    9,936
    Rep Power
    16

    Default Re: JFormattedTextField and Currency

    Moved from 'New to Java'

    db
    Why do they call it rush hour when nothing moves? - Robin Williams

Similar Threads

  1. Old value reappears in JFormattedTextField
    By Victoria in forum AWT / Swing
    Replies: 7
    Last Post: 12-13-2011, 01:20 AM
  2. JFormattedTextField and MaskFormatter
    By javaw in forum AWT / Swing
    Replies: 1
    Last Post: 04-20-2010, 06:42 PM
  3. JFormattedTextField + SimpleDateFormat
    By Ralphw in forum AWT / Swing
    Replies: 1
    Last Post: 07-07-2009, 10:53 AM
  4. Problems with JFormattedTextField
    By Gatts79 in forum New To Java
    Replies: 0
    Last Post: 10-03-2008, 04:59 PM
  5. JFormattedTextField Issue
    By teracomp in forum AWT / Swing
    Replies: 1
    Last Post: 01-21-2008, 06:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •