Frame always on top of my program only
I'm trying to create a kind of toolbar in an undecorated alwaysOnTop frame. Thus, I want my frame to be on top of my main frame, but not on top of frames from other programs. I tried this code : public class Test { private static JFrame mainFrame; /** * @param args the command line arguments */ public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { mainFrame = new JFrame("test"); mainFrame.setSize(800,600); mainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); mainFrame.setVisible(true); A a = new A(); } }); } public static