Any reason why JFrame
- Can not be modal?
- Can not hide or disable both close, minimize and maximize buttons?
> But the reason that I ask it in Swinglabs forum are:
Point I was trying to make is that your question is not related to any of the swinglabs subprojects. There is a forum http://forums.java.net/jive/forum.jspa?forumID=74 for asking swing and awt related questions and you are more likely to find answers for your questions there then here.
> Any reason why JFrame
> - Can not be modal?
> - Can not hide or disable both close, minimize and
> maximize buttons?
Any reason why:
- you asked this in Swinglabs forum?
- you can't do a bit of search yourself and read tutorials? (hint: ever heard of undecorated frames/windows)?
Yes, Sir, I use and I know undecoreted frames/windows
But the reason that I ask it in Swinglabs forum are:
1) Now we can have only modal JDialogs but NOT modal JFrames, why that?
I think that having modal JFrame may be very usefull; now, when we have
to use "modality" we have to use JDialogs, I think is too restrective.
2) Why we can not disable maximize OR minimize OR close botton or
(only one) leaving the other enabled in a [b]decorated[/b] JFrame?
Using undecorated frame we lose JFrame caption and all control bottons.
And in context that we need to disable, for example, only the close button?
Excuse me for your time.
Probably going to put my foot in it again.. What are you trying to achieve with modal frames? It would be an odd concept. One of the few reasons I can think of for preferring a Frame is that frames will get an entry in the taskbar (Windows). This will also include the native context menus for applications - often including options for multi-monitor support, flashing when the content changes etc..
At the core of things JFrame dosn't support modality so we wouldn't have a peer to work with. Modality is also (often) coupled with parentage - another feature missing from Frame. You might get some mileage from using JInternalFrames insetad, or throwing up GlassPanes over frames you don't to be enabled or doing something unpleasant with the Event Dispatch Thread (have a look at how Dialog works). But I suspect you've actually got some ulterior motives for wanting modal frames.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.