I have two jPanel one contain three textField and the 2nd JPanel have doThis when I click the doButton the data grom the textField should be displaied
I tired this but it didn't worked I made the three textField public static
and then from the 2nd JPanle I did this
private void doThis(java.awt.event.MouseEvent evt) {
String name = panleOne.txtName.getText();
String age = panleOne.txtAge.getText();
String gender = panleOne.txtGender.getText();
System.err.println(name +","+ age +","+ gender +"\nThese are the data");
}
the output that I get is only "These are the data"