I've only found ways to completely remove title bar + borders. I want to create a window in Swing without title bar buttons but still retain the default system's border. Is this possible?
4
votes
2 Answers
9
votes
The following link has a complete working example that uses remove()
on the buttons:
http://www.coderanch.com/t/344419/GUI/java/deactivate-close-minimise-resizable-window
4
votes
You can use the frame's setUndecorated()
method and render your own decorations. You may want to leverage the JInternalFrame
UI defaults, which typically recapitulate those of the platform's default Look & Feel, as shown here. These seem especially relevant:
InternalFrame.activeTitleBackground InternalFrame.activeTitleForeground InternalFrame.inactiveTitleBackground InternalFrame.inactiveTitleForeground