Swing: Disabling Minimize on a JFrame


Hi,

I am writing an application. I am creating a small JFrame for an About Popup...that appears in the Help menu.

I am able to disable the Maximize in the dialog...by using   setResizable(false);
But I am unable to disable the minimze.

Ideally i would prefer If neither the maximize or minimize appeared at all...but I want to keep the XP Dialog header if possible. I could have used JWindow instead of JFrame...but that leaves me without that dialog header....as does the  setUndecorated(true);  on JFrame.

Can anyone offer any ideas please?
ShamDAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Use a JDialog - it just has a close button
0
sciuriwareCommented:
... or a JWindow which has no buttons at all.

;JOOP!
0
objectsCommented:
you can just remove the button
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

ShamDAuthor Commented:

CEHJ,

If I use a JDialog, and want to add a JButton to it, thats funtionality would be to close the dialog, What line of code would I need to put in the actionPerformed method do this?
0
sciuriwareCommented:
setVisible(false);

;JOOP!
0
sciuriwareCommented:
And don't worry: you can add as many buttons as you like.

;JOOP!
0
ShamDAuthor Commented:
If I just setVisible to false, The Dialog is still open.
From a memory point of view, would this be bad design.
Is there an actual way to close it off?
0
sciuriwareCommented:
.destroy();
0
CEHJCommented:
>>Is there an actual way to close it off?

dialog.dispose();
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ShamDAuthor Commented:
Thanks for all you help guys.
0
CEHJCommented:
:-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.