View Single Post
  #2 (permalink)  
Old 02-01-2008, 12:56 AM
scuffia's Avatar
scuffia scuffia is offline
Member
 
Join Date: Jan 2008
Location: Cagliari (Italy)
Posts: 7
scuffia is on a distinguished road
the easiest way is to declare Object[] array if you have different kinds of controls (if all are JLabel there is no problem ,simply declase JLabel[] ), and each time you need to use a method, you first check if current element is of the class you wish to use like:
Code:
if(myArray[i].getClass().equals(JLabel.getClass()) ) //do what you want
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote