I am facing a problem with my JMenuBar location in my Java application.
I am actually using ComponentResizer.java code from the article.
and everything with the resizing works fine except from the north area of my application (undecorated JFrame) and its corners (of North Area) because the JMenuBar is preventing me from resizing from that area.
Is there a solution or maybe a hack to move the JMenuBar down a little or enable the Resizing in the north area?
I also use setJMenuBar()
method to add the JMenuBar to the north area of my application.
Code:
public class MyApp extends JFrame {
private MyApp frame;
private JMenuBar menuBar;
public static void main(String[] args) {
frame = new MyApp();
frame.setUndecorated(true);
frame.setVisible(true);
}
public MyApp(){
initComponents();
}
private void initComponents(){
setTitle("MediaForm");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 673, 482);
menuBar = new JMenuBar();
setJMenuBar(menuBar);
}
}