Results 1 to 4 of 4
  1. #1
    elsanthosh is offline Member
    Join Date
    Feb 2009
    Posts
    9
    Rep Power
    0

    Default Allowing only hex values in a textfield

    dear sir,

    i am created textfield in netbeans 6.5,i want to allow only hex values from 0 to 9 and a to f ,A to F ,other characters is not allowed .how to do it,

    thanks
    santhosh

  2. #2
    arun9683 is offline Member
    Join Date
    Jun 2010
    Location
    Bangalore,India
    Posts
    70
    Rep Power
    0

    Default

    Use javascript validation.. just google it you will get it..
    Arun K R,Bangalore,India
    :)

  3. #3
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Use JavaScript huh?
    Java is not JavaScript. Don't related them please.
    And I think he didn't said he was doing web work. So no JavaScript.

    Try FormattedText Field-
    How to Use Formatted Text Fields (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,239
    Rep Power
    19

Similar Threads

  1. hex values in textfield
    By elsanthosh in forum AWT / Swing
    Replies: 2
    Last Post: 07-19-2010, 01:43 PM
  2. Replies: 6
    Last Post: 04-28-2010, 12:49 AM
  3. regex problem - allowing optional space
    By Norm in forum Advanced Java
    Replies: 26
    Last Post: 10-06-2008, 04:38 PM
  4. Replies: 0
    Last Post: 05-22-2008, 10:53 AM
  5. Allowing only numeric values in a TextField
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-01-2008, 10:08 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
  •