I'm developing a small desktop application for my college java project.
There's a main window which contains a JTable
and when i click a specific record it pops out another JFrame
containing full details of specific record.
When I click a record and if I click another record without manually closing the first one it still exists.. (anyway it's obvious).
I want to get the first frame to be disposed when ever I click another.
Simply I want only one frame containing details at a time, with the main window..
- I tried it couple of time using
JPanel
objects instead of frames and it was useless. - And tried this with singleton pattern and when I use it only one frame pops out at a time still.. Contains the same details for every record I click in the table..
What is a method to get this requirement done?