This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.
Joined: Nov 22, 2004
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?
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...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Nov 22, 2004
I ended up using a JPopupMenu. It seems to work fine. Thanks for all your help. Lisa