I am writing a java application that takes advantage of a dual monitor set up. I have two windows:
- Window 1 - Main GUI
- Window 2 - Full Screen on Second monitor
My Problem: The second window only stays full screen when it has the focus. If I click back on window 1 or change the focus to something else, window 2 minimizes. Is there someway to make window 2 stay full screen when it doesn't have focus?
Here is my code for making the second window full screen on the second monitor:
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
frame.setUndecorated(true);
frame.setVisible(true);
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gd = ge.getScreenDevices();
gd[1].setFullScreenWindow(frame); //gets the 2nd display.