Pages

Borderless JFrame

Source code below will show you simple way to create borderless JFrame in java.

*************************************************************************
COMPLETE SOURCE CODE FOR : CreateBorderlessJFrame.java
*************************************************************************


import javax.swing.JFrame;

public class CreateBorderlessJFrame
{
public static void main(String[]args)
{
JFrame myBorderlessJFrame=new JFrame();

//setUndecorated(true) for JFrame will remove it's title bar.
//So it make JFrame seem like borderless.
myBorderlessJFrame.setUndecorated(true);

//Set JFrame size to 400 pixels width and 400 pixels height
myBorderlessJFrame.setSize(400,400);

//Make JFrame visible. So we can see it.
myBorderlessJFrame.setVisible(true);
}
}


*************************************************************************
JUST COMPILE AND EXECUTE IT
*************************************************************************
Related Posts Plugin for WordPress, Blogger...