The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Take a Look at my prog and check out the error ?and anyone to explain

Posted by senthil on June 12, 2001 at 5:25 PM

I added the components this way
Checkbox b=new Checkbox("Checkbox_1");
add(b);

Checkbox b=new Checkbox("Checkbox_1");
add(b);

Checkbox b=new Checkbox("Checkbox_1");
add(b);

the output was three checkbox were created?

Now my doubt is can the applet take in the same reference name (i.e)

i gave in the same reference "b" for all three checkbox component?

can we do it this way ?

can anyone explain me the logic of this?



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us