Below is the piece of code I am trying
The program compiles well but throws java.lang.ArrayStoreException: javax.swing.JTextArea
I know the reason is I am storing two different object JTextFiled and JTextArea to single array it is coming like that but both JTextField and JTextArea are derived from JTextComponent can't I take a single array , why to take two different array for them.
Is there any alternate way to do it in a single array .
The program compiles well but throws java.lang.ArrayStoreException: javax.swing.JTextArea
I know the reason is I am storing two different object JTextFiled and JTextArea to single array it is coming like that but both JTextField and JTextArea are derived from JTextComponent can't I take a single array , why to take two different array for them.
Is there any alternate way to do it in a single array .