1
votes

I'm developing a media player using vlcj 3.8 library (direct rendering), JDK 1.8 and Netbeans. I have my player running well, but I need to set it on full screen without any title or menu bar. I tried this way

            GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0];
        device.setFullScreenWindow(this);

and it works but it's always on top (you can't even do cmd+tab).I need a way to set the player on full screen and also do some other stuffs on the background. I already tried with setUndecorated and frame.setExtendedState and they don't work.

1

1 Answers

0
votes

On Windows:

new Win32FullScreenStrategy(yourWindow).enterFullScreenMode();

On Linux:

new XFullScreenStrategy(yourWindow).enterFullScreenMode();

The Win32FullScreenStrategy and XFullScreenStrategy are both classes provided by vlcj.

(Obviously you don't (shouldn't) create a new strategy implementation each time you enter/leave full-screen, it just makes the example code smaller.)

This question was also tagged OSX, there is currently no equivalent native strategy implementation provided by vlcj for OSX so if using the GraphicsEnvironment is not working for you, then I don't know.