Results 1 to 2 of 2
  1. #1
    yhqian99 is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default JTextField:four digit in the middle displayed as wildcard while user type the number

    i all,

    I am developing a Swing application which use JTextField to let user input telephone number. For security, the four digit in the middle need to be displayed as wildcard while user type the phone number. At meanwhile, this JTextField also show the four digit in the middle as wildcard when the phone number is from database .


    How to customize the JTextField? Any help are highly appreciated.


    Lucy Qian

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,864
    Rep Power
    8

    Default Re: JTextField:four digit in the middle displayed as wildcard while user type the nu

    You could override paintComponent() or set the UI to whatever you want.

    Or just use a JPasswordField for that section of the number.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Finding MIddle number help
    By rosanator10 in forum New To Java
    Replies: 6
    Last Post: 02-01-2012, 12:55 AM
  2. Possible combinations for a n- digit number???
    By anishr6 in forum New To Java
    Replies: 4
    Last Post: 05-25-2011, 08:55 AM
  3. Replies: 0
    Last Post: 01-23-2011, 12:37 AM
  4. select a digit in a number
    By navid in forum New To Java
    Replies: 3
    Last Post: 12-12-2010, 10:47 AM
  5. Replies: 4
    Last Post: 03-25-2009, 04:54 AM

Posting Permissions

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