Dear All!! I suffer a trouble in UI design. I got several frames in the project, nearly finished the function in each single frame, but i cannot link them together. for example: First frame1 = new First(); CheckIn frame2 = new CheckIn();
void jButton1_actionPerformed(ActionEvent e) {???} what can i write into {???} to implement "press button in First frame then go to CheckIn frame?"
Hi, I don't know your requirement. But i think your approach is wrong. For a particular project you should use a single Frame and for all other screens you should use either JDialo or JPanel....
the second class should be like this. CheckingClass extends JPanel/JDialog
It should be instantiated inside the button pressed method. Like : CheckingClass obj = new CheckingClass() obj.show();
Having multiple frames is fine as long as it is logical to the user. All you should have to do is frame1.hide() frame2.show()
unless I'm not understanding the question.
I'm not sure what you mean by 'press button in First frame'. Where you have the ??? appears to be the ActionListener attached to the button so it would have been pressed.
You have already asked this question and received some good advice here. Plese do not post the same question more than once. It makes it hard for people to follow and help.