java JMenuBar not visible? Why?
问题 I cannot figure out why my menu bar isn't visible. I have following code: //Main import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; public class Menu extends JFrame{ public static void main(String[] args){ JFrame frame = new JFrame(); frame.setSize(500,350); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); menuBar mbObj = new menuBar(); mbObj.menuBar(frame); } } //Menu Bar class public class menuBar{ private JMenu file