View Single Post
  #1 (permalink)  
Old 01-31-2008, 08:27 PM
Cymro Cymro is offline
Member
 
Join Date: Jan 2008
Posts: 7
Cymro is on a distinguished road
[Resolved] Putting controls in arrays?
Hello all, I couldn't find anything under "control array(s)", so I hope you can answer this for me.

Is it possible to put controls in arrays (ie,
Code:
public static someSortOfDataType[] myArray = {jLabel1,jLabel2,etc};
), and then modify them (myArray[1].setText)? If so, what sort of data type would the array be?

I am aware of a fairly long winded bit of code that creates the controls at runtime (which would be a little annoying to use), but I was wondering if there was another way.

Thanks in advance.

Last edited by Cymro : 02-02-2008 at 11:21 AM. Reason: Found an answer
Reply With Quote
Sponsored Links