Solved

JFrame Close Icon

Posted on 2001-06-22
2
373 Views
Last Modified: 2010-05-18
How do I create a JFrame and get rid of the close icon in the upper right corner?
0
Comment
Question by:jaiken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
kylar earned 200 total points
ID: 6219951
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
 
LVL 7

Expert Comment

by:Igor Bazarny
ID: 6220146
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question