1

Before anyone asks, I have tried using setAlwaysOnTop(false). Here is a repeatable example.

import javax.swing.JFrame;

public class SOQ_20200913
{

   public SOQ_20200913()
   {
   
      JFrame frame = new JFrame("SOQ_20200913");
      
      //for simplicity's sake, you could also comment these 2 lines - they don't seem to help or hurt the situation
      frame.setLocation(200, 200);
      frame.setSize(300, 300);
      
      frame.setAlwaysOnTop(false);
   
      frame.setVisible(true);
   
   }
   
   public static void main(String[] args)
   {
   
      SOQ_20200913 stackOverflowQuestion = new SOQ_20200913();
   
   }

}

After I run, I click away and try to click on my code, and then my web browser, but the JFrame always remains on top.Here is a visual of what I am talking about.

Am I missing something? Is there some other field I should be setting here?

davidalayachew
  • 1,279
  • 1
  • 11
  • 22

0 Answers0