Solved

JFrame Close Icon

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
changeXy challenge 13 57
wordappend challenge 8 85
micro services vs rest web services 16 48
Java passing arguments (type error) 2 35
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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…

706 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

20 Experts available now in Live!

Get 1:1 Help Now