A
african brewer
Hi all,
I have a small problem,i want to add all my text fields in a panel to
a collection.
I also want to be able to access the text in those text fields later
on while i traverse my collection.
I dont want to add the text fields one after another,i want to be able
to add them wholesale like this
Component[] component= pnlMiddle.getComponets();
The problem with the above way of doing it is that the array will be
hold java.awt components instead of javax.swing components of which
JTextField is a subclass.
My question is: is there a method that i can use instead of
java.awt.getComponents()
something like
JTextField[] component= pnlMiddle.getComponets();
I have a small problem,i want to add all my text fields in a panel to
a collection.
I also want to be able to access the text in those text fields later
on while i traverse my collection.
I dont want to add the text fields one after another,i want to be able
to add them wholesale like this
Component[] component= pnlMiddle.getComponets();
The problem with the above way of doing it is that the array will be
hold java.awt components instead of javax.swing components of which
JTextField is a subclass.
My question is: is there a method that i can use instead of
java.awt.getComponents()
something like
JTextField[] component= pnlMiddle.getComponets();