Make a JFrame always visibleTag(s): Swing

import javax.swing.JFrame;
import javax.swing.JLabel;

public class Test2 {
    public static void main(String[] args) {
        JFrame frame = new JFrame("Hello!!");
        frame.setAlwaysOnTop( true );
        frame.setLocationByPlatform( true );
        frame.add(new JLabel("  Always visible") );
        frame.pack();
        frame.setVisible(true);
    }
}




If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]