Make a JFrame not visible in the the TaskBar Tag(s): Swing
About cookies on this site
We use cookies to collect and analyze information on site performance and usage,
to provide social media features and to enhance and customize content and advertisements.
import javax.swing.JFrame;
public class NotInTaskbar extends JFrame {
NotInTaskbar() {
setType(Type.UTILITY); // ***
setVisible(true);
setSize(200, 200);
setTitle("Not Visible in the Taskbar");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args){
new NotInTaskbar();
}
}
or use a JDialog instead.
import javax.swing.JDialog;
public class NotInTaskbar extends JDialog {
NotInTaskbar() {
setVisible(true);
setSize(200, 200);
setTitle("Not Visible in the Taskbar");
}
public static void main(String[] args){
new NotInTaskbar();
}
}