How to check if a JInternalFrame
is already open in JDesktopPane
and, if so, put it in focus on the others? I have tried in many ways that I found searching, but always opens a new frame, even if it is already open.
This is the code executed when clicking the corresponding item in JMenu:
private void jMenuItemRegisterEmployeeActionPerformed(java.awt.event.ActionEvent evt) {
RegisterEmployeeJInternalFrame register = new RegisterEmployeeJInternalFrame();
jDesktopPaneMain.add(register);
register.setVisible(true);
}