JFrame Close Icon

How do I create a JFrame and get rid of the close icon in the upper right corner?
jaikenAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
kylarConnect With a Mentor Commented:
You can't. Your only choices are to live with it or use a JWindow (which has no title bar at all). Lastly, you could catch the close event and have it do nothing.

Cheers,
Kylar
0
 
Igor BazarnyCommented:
Hi,

You don't even need to 'catch the close event' to prevent window closing. Just call setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE). But there is no way to change set of buttons shown.

Regards,
Igor Bazarny,
Brainbench MVP for Java 1
www.brainbench.com
0
All Courses

From novice to tech pro — start learning today.