Article View: borland.public.jbuilder.java.language
Article #15518Can't figure out the error
From: Ed
Date: Thu, 03 Jun 1999 00:00
Date: Thu, 03 Jun 1999 00:00
26 lines
1351 bytes
1351 bytes
I am having a problem with a simple Java test. I have 5 checkboxes
and a textfield. I want the current selected checkbox to be displayed
in the
public void itemStateChanged( ItemEvent e ) {
Checkbox hold;
/*
if ( e.getItemSelectable() == checkbox1 ) {
text1.setText( "Check Box 1 Clicked" );
}
if ( e.getItemSelectable() == checkbox2 ) {
text1.setText( "Check Box 2 Clicked" );
}
if ( e.getItemSelectable() == checkbox3 ) {
text1.setText( "Check Box 3 Clicked" );
}
if ( e.getItemSelectable() == checkbox4 ) {
text1.setText( "Check Box 4 Clicked" );
}
if ( e.getItemSelectable() == checkbox5 ) {
text1.setText( "Check Box 5 Clicked" );
}
*/
hold = (Checkbox) e.getItemSelectable();
text1.setText( hold.getLabel() + " was clicked." );
Technical Details
Message-ID:
<3756b6e1.14662934@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,80d3bc55874b2425,start X-Google-Attributes: gidf74b3,public From: dunphy.eg@buckconsultants.com (Ed) Subject: Can't figure out the error Date: 1999/06/03 Message-ID: <3756b6e1.14662934@forums.borland.com> X-Deja-AN: 485329737 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language