What complications if i m to declare this frame as static?
Is it a bad taste(bad programming) to declare a JFrame in a class as static.
If I had a class called, ReservationForm. In it, I declared a JFrame frame1 to setup a JFrame components with some the swing components.
The reason I declared the frame in ReservationForm class as static as I wanted to remove the frame1 ONLY after user has click on a submit button in another JFrame (call frame2).
What I did:
I wrote a method - public void close() in frame1. I can only dispose this frame1 when user click a submit button in frame2. Immediately after disposing frame1, it display the frame1 again with data in the JTable updated.