I am having issue with jmenu popup in netbeans. It only sometimes works. Sometimes I don't get a java popup at all. Sometimes my File and Edit options are completely missing. This is what my code looks like.
import javax.swing.*;
public class menu {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
JFrame f = new JFrame();
f.setVisible(true);
f.setSize(400,400);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLocationRelativeTo(null);
JMenuBar mb = new JMenuBar();
JMenu file = new JMenu ("File");
mb.add(file);
JMenu edit = new JMenu("Edit");
mb.add(edit);
f.setJMenuBar(mb);
}
}