I am making a window which contains, 1 JFrame and inside the JFrame contains a JMenuBar -> 3 JMenu -> Several JMenuItem in each JMenu ... inside the JFrame I also have several buttons and a JLabel.
Well the problem that happens to me is that I put the JMenu on the moment to go clicking.
This would be the code I have in JMenu (in the other Jmenu only varies only the pdf that opens)
try {
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "C:/Users/Abad Hermida/Documents/NetBeansProjects/MRP/Manual/Manual.pdf");
} catch (IOException e) {
JOptionPane.showMessageDialog(rootPane, "Error al Abrir el Archivo", "ERROR", JOptionPane.ERROR_MESSAGE);
}
The code works ... this code I have in the buttons (in the other buttons only varies only what opens)
open.setVisible(true);
open.setTitle("Administrator");
this.setVisible(false);
This is the class of SOURCE
public Users() {
initComponents();
setTitle("Users");
setIconImage(new ImageIcon(getClass().getResource("../icons/32x32/users.png")).getImage());
}
Images for greater understanding
On the left side you see how the window should be seen, and to the right side as seen after navigating the JMenu and in the second image just highlight the COMPONENT NAVIGATOR OF THE WINDOW IN QUESTION.
In this image of the left side it is shown as it should be seen, and the right side as it is decomposed:
In the second image just highlight the NAVIGATOR OF COMPONENTS OF THE WINDOW IN QUESTION: