Re: TextField error checking

From: Tony Morris (dibblego_at_optusnet.com.au)
Date: 12/28/03


Date: Mon, 29 Dec 2003 00:25:31 +1000

You want to create your own Document implementation and override the public
void insertString(int offset, String str, AttributeSet a) throws
BadLocationException method.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
"- ions" <negative_ions_0@hotmail.com> 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.


Relevant Pages

  • Re: new browser windows all recieve the same session id
    ... That is container dependant. ... > "Tony Morris" wrote in message ... >> Software Engineer ... is there a way to force child windows to ...
    (comp.lang.java.programmer)
  • Re: Socket programming
    ... "Tony Morris" wrote in message ... > when developing a protocol, ... Very difficult to scale. ... > Software Engineer ...
    (comp.lang.java)
  • Re: reinitialize byte array to zero
    ... I don't have access to Sun 1.4.1, I'd be surprised to see the result. ... IBM Australia - Tivoli Security Software ... "Tony Morris" wrote in message ... > Software Engineer ...
    (comp.lang.java.programmer)
  • Re: simple beginners question
    ... "martin" wrote in message ... > "Tony Morris" wrote in message ... >> Software Engineer ... >> IBM Australia - Tivoli Security Software ...
    (comp.lang.java)