How can I keep my application always full screen without being minimized?

5

I'm developing a Java application that should stay full screen and can not be minimized or make room for another application or even the OS, somehow blocking everything and leaving it on the screen, but I'm having trouble

I can leave it in full screen but if I use Alt + Tab, it minimizes.

How do I get this behavior?

    
asked by anonymous 01.08.2016 / 04:19

1 answer

-3
To block Alt + Tab you can use a more aggressive form:

public class AltTabStopper implements Runnable
{
     private boolean working = true;
     private JFrame frame;

     public AltTabStopper(JFrame frame)
     {
          this.frame = frame;
     }

     public void stop()
     {
          working = false;
     }

     public static AltTabStopper create(JFrame frame)
     {
         AltTabStopper stopper = new AltTabStopper(frame);
         new Thread(stopper, "Alt-Tab Stopper").start();
         return stopper;
     }

     public void run()
     {
         try
         {
             Robot robot = new Robot();
             while (working)
             {
                  robot.keyRelease(KeyEvent.VK_ALT);
                  robot.keyRelease(KeyEvent.VK_TAB);
                  frame.requestFocus();
                  try { Thread.sleep(10); } catch(Exception) {}
             }
         } catch (Exception e) { e.printStackTrace(); System.exit(-1); }
     }
}

I understand that you want this.

    
24.02.2017 / 19:30