Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getComponent on a Panel

807598Oct 12 2006 — edited Oct 12 2006
Hi,

I've several panels and and several components (TextField, TextLabel, Table, etc) on each panel. I want to get a specific component from a panel change the text of this component in each loop. So How can i get the component with its name. I can get the component with number but i don't like this method since adding or removing components from panel changes the number.
JTextField tf = (JTextField)mySOM.ControlsPanel_1.getComponent(6);
			tf.setText(String.valueOf(nbhRadius));
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 9 2006
Added on Oct 12 2006
5 comments
196 views