I need to display a Java JMenu opening upwards instead of downwards.
I am creating an application made of a series of JFames. One of those JFrames hosts a JMenuBar, built by a series of JMenu instances, and given the size and the position of this JFrame, it is at the bottom of the application.
The application runs in a high resolution display shared with other applications, and it is placed at the top position of it.
So using the default settings of JMenu causes the menu opening downwards overlapping the others applications areas running on the bottom of the screen.
Can anyone help me in finding the correct way for forcing the menu opening upwards please?
I tried using the setLocation() method of the JMenu class, I was expecting the menu open at the coordinates I gave, but it did not work. I also investigated at the BoxLayout features, but it did not help.