Click to See Complete Forum and Search --> : JFrame problem
buddu
Aug 7th, 2001, 12:38 AM
How to hide or disabling the Close Button of Jframe in java
Please help me
cmitulescu
Aug 10th, 2001, 01:38 AM
I do not think that you can(maybe) but you could use a window and then implement other stuff such as dragging etc.
Dillinger4
Aug 10th, 2001, 07:41 AM
Ill have to second that. I didnt see any options to disable or hide the window closing button on a JFrame. JFrame only has two constructors . One empty and one that takes a string.
VirtuallyVB
Aug 13th, 2001, 01:32 PM
Check out JFrame's
public void setDefaultCloseOperation(int operation)
To make the JFrame behave the same as a Frame instance, use setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE).
This is the "disable the button" solution, but not the "remove the button" solution.
As they suggested, you could extend Window and define your own bahavior. Heck, you might even extend JFrame and define your own behavior and look.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.