Results 1 to 5 of 5
  1. #1
    casperjeff is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Combine JFormattedTextField with JPassword functionality?

    Seem to be doing a LOT of work trying to extend JFormattedTextField to add JPassword-like functionality.....
    Anyone ever do this before?
    Any thoughts on a simple approach? My particular use case is entry of a SSN in a non-secure (prying eyes watching the screen) environment.

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    What type of formatting are you using? Are you just trying to validate that the characters entered are numeric? If so, then use a JPasswordTextField and use a DocumentFilter to validate the character as they are entered.

  3. #3
    ra4king's Avatar
    ra4king is offline Senior Member
    Join Date
    Apr 2011
    Location
    Atlanta, Georgia, US
    Posts
    396
    Rep Power
    4

    Default

    What are your reasons for not using JPasswordField?

  4. #4
    casperjeff is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default

    Customer wants the automatic and untouchable 'dashes' in the SSN field element...so the need for both JFormattedTextField coexists with the JPassword field.
    :(

  5. #5
    ra4king's Avatar
    ra4king is offline Senior Member
    Join Date
    Apr 2011
    Location
    Atlanta, Georgia, US
    Posts
    396
    Rep Power
    4

Similar Threads

  1. JFormattedTextField and MaskFormatter
    By javaw in forum AWT / Swing
    Replies: 1
    Last Post: 04-20-2010, 07:42 PM
  2. add jformattedTextfield in jtable
    By anilkumar_vist in forum Advanced Java
    Replies: 1
    Last Post: 11-18-2009, 06:42 PM
  3. JFormattedTextField + SimpleDateFormat
    By Ralphw in forum AWT / Swing
    Replies: 1
    Last Post: 07-07-2009, 11:53 AM
  4. JFormattedTextField Issue
    By teracomp in forum AWT / Swing
    Replies: 1
    Last Post: 01-21-2008, 07:55 PM
  5. Jpassword problem
    By Nick15 in forum AWT / Swing
    Replies: 1
    Last Post: 05-14-2007, 05:47 PM

Posting Permissions

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