File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JInternalFrame title bar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JInternalFrame title bar" Watch "JInternalFrame title bar" New topic
Author

JInternalFrame title bar

Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
I'm trying to remove the title bar from a JInternalFrame. Any suggestions would be appreciated.

Thanks, Lisa
Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
I would also like to make the frame not moveable. Thanks
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Part of GUI programming is knowing what components to use in the appropriate place. If you need a JInternalFrame without a title bar and not movable, I'd suggest using a JPanel instead. If you'd like to tell us what you are trying to do, we can probably be more helpful.


GenRocket - A Test Data Generation Platform
Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
I'm trying to create a popup with the following attributes.
- can not move
- can not resize
- no title or title bar
- is not model

I tried using a JPanel and it works great. However since I'm using it as a popup when I click on the JPanel where there are components under the popup the components under the popup bleed through.

So I tried experimenting, evan through some of the following is not really what I want.

I tried a JOptionPane with a JDialog and it does not bleed through. However it is model.
I tried a JOptionPane with a JInternalFrame and it bleeds through.
I tried a JInternalFrame instead of the JPanel and it does not bleed through. So now I was just trying to get the popup to act as I listed above.

I really appreciate your help and I thank you for any suggestions.

Thanks, Lisa
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Well, you can make make your own JDialog that isn't model by creating a class that extends JDialog. But you will still get the movable aspect which you don't want. And it will have a title bar.

What are you using this "popup" for? Messages, options, or what?
Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
Just for an alert message. The user can leave it open and do other things or they can close it.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

So if they leave it open, what happens to it when they continue working? Does it go behind the focused window? What happens if a lot of these are open? No offense, but I wouldn't do that. There are certain conventions that users of GUI apps expect. To go against these conventions just makes your app a bit more difficult to use.
Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
Actually if they do something else the window will close. They can make the window visible is they click the button-icon again. I have all the behavior functionality working and the window as a JPanel is in production. I'm just trying to work out a way to not have anything behind the JPanel-popup bleed through. It seems that nothing bleeds through using the JInternalFrame instead of the JPanel.

Is there anyway I can use the JPanel and have nothing bleed through?
or
Do you know how I can reconfigure the JInternalPane to remove title bar and not move or resize?
or
Do you suggest anyother component that might work better than JPanel or JInternalFrame?

Thank you for all you time and thoughts. Lisa
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

What do you mean by "bleeds through"? I thought you might be having a problem with heavyweight vs. lightweight components and the Popup, but I tried a little test for that and (amazingly) it looks like the Popup show up even over heavyweight components...

I did find an interesting thing about Popups though - if you specify null as the owner, or specify a point outside the screen bounds of the frame, the Popup will show up in it's own separate window (looks like it's using Window or JWindow, so no title bar, etc.). This sounds like it may be closer to what you want...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Lisa Zapson
Ranch Hand

Joined: Nov 22, 2004
Posts: 50
I ended up using a JPopupMenu. It seems to work fine. Thanks for all your help. Lisa
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JInternalFrame title bar
 
Similar Threads
JInternalFrame
Frame without M&M buttons
Adding Buttons to JFrame title bar
Removing titlebar from an internal frame
How to add a button to the Title bar?