Solved

JFrame Close Icon

Posted on 2001-06-22
2
347 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
topping2 challenge 13 80
ArrayIndexOutOfBoundException 9 67
Java - Why doesn't this JFrame work 3 41
table example 4 22
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

911 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now