I am making an application for processing customer orders(in java).
My program has 3 JFrame
windows (Yes I know its not a good idea to use multiple frames, but they aren't really connected to each other).
- Main one: Here you select what you are (Customer or Operator)
- Customer
JFrame
- Operator
JFrame
After a Customer makes an order ( main frame > customer frame > complete order(button). I am doing something like this:
customerframe.dispose();
customerframe.revalidate();
customerframe.repaint();
reloadframe(); ///a method which reinitializes the frame (Note: I am doing a frame=new JFrame() here)
mainframe.setVisible(true);
I select customer again it opens the customerframe
but the problem is that the listeners don`t work anymore, I guess they somehow remain connected to the old frame or something.
I have been trying to make it work for some hours now...