java window always on top

Solutions on MaxInterview for java window always on top by the best coders in the world

showing results for - "java window always on top"
Kaden
09 Aug 2016
1import javax.swing.JFrame;
2import javax.swing.JLabel;
3
4public class Annoying {
5    public static void main(String[] args) {
6        JFrame frame = new JFrame("Hello!!");
7
8        // Set's the window to be "always on top"
9        frame.setAlwaysOnTop( true );
10
11        frame.setLocationByPlatform( true );
12        frame.add( new JLabel("  Isn't this annoying?") );
13        frame.pack();
14        frame.setVisible( true );
15    }
16}
17