I'm still very new to Java.
In C# we have the ability to just go and set the form border style like this:
this.FormBorderStyle = FormBorderStyle.None;
How can I accomplish this.
I'm still very new to Java.
In C# we have the ability to just go and set the form border style like this:
this.FormBorderStyle = FormBorderStyle.None;
How can I accomplish this.
You can use the JFrame method setUndecorated(true)
. Here is an example:
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Main {
public static void main(String[] args) {
JFrame frame = new JFrame("TitleLessJFrame");
frame.getContentPane().add(new JLabel(" HEY!!!"));
frame.setUndecorated(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 200);
frame.setVisible(true);
}
}