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?
Asked
Active
Viewed 3,718 times
2 Answers
9
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
-
2I have seen many a complaints about answers with mainly html links (to other sites) that could become dead links please rather post the code here and reference it . but besides that +1 – David Kroukamp Dec 08 '12 at 21:06
4
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