Re: TextField error checking
From: Tony Morris (dibblego_at_optusnet.com.au)
Date: 12/28/03
- Next message: Tony Morris: "Re: Array Question"
- Previous message: Tony Morris: "Re: Clear screen"
- In reply to: - ions: "TextField error checking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Tony Morris: "Re: Array Question"
- Previous message: Tony Morris: "Re: Clear screen"
- In reply to: - ions: "TextField error checking"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|