How to get active (having focus) frame (JInternalFrame) that is inside JDesktopPane? I need it for my MDI notepad (not that anybody would use that, just a training project). Looking at api, I see only functions to get all JInternalFrames, not active one.
How to get active (having focus) frame (JInternalFrame) that is inside JDesktopPane? I need
Share
Use JDekstopPane.getSelectedFrame() method (From doc: currently active JInternalFrame in this JDesktopPane, or null if no JInternalFrame is currently active.) or
JDesktopPane.getAllFrames()to get list of allJInternalFramescurrently displayed in the desktop and checkisSelected()method.