I am (still) a beginner in Java, and I created a little software which contains a main frame.
I need to cover all the Desktop behind my software such as a windows 98 installing screen : (I need the black and blue screen behing, covering all the task bar etc).
In order to do this, I used GraphicsDevice which goes full screen. It is exactly what I needed :
public class Fond_noir extends JFrame { private boolean isFullScreen = false; private GraphicsDevice device; public Fond_noir(int etat) { GraphicsEnvironment env = GraphicsEnvironment .getLocalGraphicsEnvironment(); this.device = env.getDefaultScreenDevice(); initFullScreen(etat); } private void initFullScreen(int etat) { isFullScreen = device.isFullScreenSupported(); if (etat==0) { setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); } if (etat==1) { setDefaultCloseOperation(DISPOSE_ON_CLOSE); } setUndecorated(isFullScreen); setResizable(!isFullScreen); if (isFullScreen) { // Full-screen mode device.setFullScreenWindow(this); validate(); } else { // Windowed mode this.setExtendedState(MAXIMIZED_BOTH); this.setVisible(true); } } }
Then, I call this method in a main somewhere else, (there's no problem with this) :
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new Fond_noir(0);
Choix_Langue inst = new Choix_Langue(); // main frame
inst.setLocationRelativeTo(null);
inst.setVisible(true);
} } ); }
But the problem is, that my main frame can't show-up, and it's hidden behind my fullscreen.. I'd like the opposite ! Or when I click on my main frame in my task bar (aften using the window key of my keyboard ofc..) I can only see my main frame, and the fullscreen is not showing-up with the frame
=> Is there a way to show both my frame and my GraphicsDevice ? Using "priorities" between them..?
Thanks for reading !