JFrame without frame border, maximum button, minimum button and frame icon

Viewed 56989

I would like to create a without frame border, maximum button, minimum button and frame icon.

5 Answers

Call setUndecorated(true) on your JFrame.

This method can only be called while the frame is not displayable (see JavaDoc).

enter image description here

Inside the constructor you can put code setUndecorated(true) it will disappear Frame.

For example: //This is constructor

public freak() {    
    super("Images");
    panel = new JPanel();
    ImageIcon image = new ImageIcon("C:\\Users\\shilu.shilu-PC\\Desktop\\2.jpg");
    label = new JLabel(image);
    add(panel);
    add(label);

    //Main thing is this one
    setUndecorated(true);
    //Just add this code in your constructor
}
Related