Window - JDialog Question

Hey all,
I am translating a C++ program to Java and have come across a pickle.  I need to have a window (or Jdialog or JFrame) that does have a title bar, is external to the applet, but is NOT maximizable/minimizable. That is, it does NOT have the [], or 'X' in the top right of the window at all.  Any ideas on how to do this in Java?  Should I go with a JDialog and hide the X and [] or with a JWindow and try to add a title bar?


Rob
robin_at_mriAsked:
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.

antonsigurCommented:
What about this constructor:
JDialog(Frame owner, String title). This one has title, right?
0
robin_at_mriAuthor Commented:
It has the title, but it also has the 'X' and '[]' buttons at the far right of the title bar.


Rob
0
robin_at_mriAuthor Commented:
Well the 'X' anyways.  Trying to figure out how to get rid of that 'X' that closes the JDialog.


Rob
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

antonsigurCommented:
Ok, you could:
       JDialog d = new JDialog(this, "The title", true);
       d.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);

Now the dialog won't close, even if the buttom is pressed, however, the buttom is still here..
0
robin_at_mriAuthor Commented:
Yeah I already have that setup.  The only good way to do it is to create it without the X button and without the icon.  I am surprised that Java doesn't have some upper level container that looks like that.


Rob
0
antonsigurCommented:
I think you can't remove the buttom.... hmm... I have never seen a Java frame with no buttom on it....
0
sct75Commented:
You'd better go with JWindow or Window at start point and try to add a tool bar in, because there seems no way to turn off "X" or "[]" on JDialog or JFrame.

When using JWindow or Window, you could grab its rootPane and set a BorderLayout and put the ToolBar to the North of it.

Good luck.
0
shji1Commented:
You can try and use the setUndecorated(false) method.
Make sure you do that before you display the dialog or frame.
--
0
sct75Commented:
We once used Window as superclass to create a splash screen look screen at startup. So I pretty sure descendents of Window would work. Adding toolbar like general components to a Window container should be fairly easy then.
0
CleanupPingCommented:
robin_at_mri:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
girionisCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQed and points NOT refunded.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer
0
YensidModCommented:
This question is PAQed  and no points refunded (of 35).

YensidMod
Community Support Moderator
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
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
Java

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.