Re: TextField error checking

From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 12/22/03

  • Next message: Ovid: "Overriding class data"
    Date: 21 Dec 2003 17:00:20 -0800
    
    

    negative_ions_0@hotmail.com (- ions) wrote in message news:<4799447d.0312210507.73cb102@posting.google.com>...
    > I have created a JComboBox with its Items as a list of "M" numbers ie.
    > M1,M2,M3.......throgh too M110 (thes are the messier objects, a
    > catolouge of deep sky objects) the user selects of of these and views
    > it aswell as infomation. The program also has a JTextFiels which
    > allows the user to enter the M number. The problem i have is checking
    > that what the user has entered is valid, that being an M followed by 1
    > - 110 Nothing else, i thought of checking it against the items in the
    > comboBox with itemAt() but i cudnt work out a way of looping through
    > them, and using that within the if() Expression.... please help.
    You can use InputVerifier extended class, or, more simply, you can do
    the check in the ActionListener for the JTextField.


  • Next message: Ovid: "Overriding class data"

    Relevant Pages

    • Re: TextField error checking
      ... a catolouge of deep sky objects) the user ... > selects of of these and views it aswell as infomation. ... to the expected format. ...
      (comp.lang.java)
    • Re: TextField error checking
      ... a catolouge of deep sky objects) the user ... >> selects of of these and views it aswell as infomation. ... > public class TestIsValidSkyObjectID ...
      (comp.lang.java)
    • Re: TextField error checking
      ... >> it aswell as infomation. ... The program also has a JTextFiels which ... > the check in the ActionListener for the JTextField. ... Thats where my problem lies, im not sure how to acually do the ...
      (comp.lang.java)