This content has been marked as final. Show 2 replies
should I disable the item once the frame is opened?1. I understand that you have an "Open" menu item for each frame. So if you want to have only one frame displayed at a time, you must disable all "Open" menu items.
2. The way you describe seems to require only an open and close listener and spares a checking if any frame is already open. But the checking is not much more code. Just set and clear a flag when opening/closing a frame. It might be considered as being more user friendly, if he receives a message when trying to open a second frame. But compared to seeing disabled menus, I think this is not too big an issue.
every time i open a frame the information from the database will be loaded, is that correct "programming"Only if you retrieve a huge amount of data from the db with noticeable waiting time, I would consider storing each frame's data - provided they don't change between two user requests to the same frame.
Aren't your single internal frames be elligible to be internal dialogs instead?
This is described in http://docs.oracle.com/javase/tutorial/uiswing/components/internalframe.html, in particular you can use the handy JOptionPane.showInternalXxxDialog(...).