I hope I'm not posting a duplicate question, but I wasn't able to find a question like this so maybe I'm safe? Anyway...
For the applications that I'm making, I'm going to have two applications (two separate processes and windows) open at the same time. The computer on which these applications will be running on will have multiple monitors. I want the first application/ window to fullscreen and occupy one of my monitors (easy part), and the other one to be fullscreen on the second monitor. If possible, I would like for them to initialize this way.
At the moment, I am making my windows fullscreen by using this code:
this.setVisible(false);
this.setUndecorated(true);
this.setResizable(false);
myDevice = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
myDevice.setFullScreenWindow(this);
The class that this is in is an extension of the JFrame class and myDevice is of the type "GraphicsDevice". It's certainly possible that there's a better way to make my window fullscreen so that I can have two different applications fullscreen over two different monitors.
If I was unclear in any way, please say and I'll try to edit in clarifications!
First, you need to position your frames on each screen devices.
Then to maximize a frame, simply call this on your JFrame:
Here is a working example illustrating that: