As far as I know there is no API for this in the JInternalFrame
class, but you can do that via the component UI:
The title bar of a JInternalFrame
is a Container
. You can get it from the InternalFrameUI
by casting it to BasicInternalFrameUI
. It's called northPane
. The internal frame menu button is the first component in this title pane. You can simply remove it or make it invisible:
// Title or north pane of the internal frame:
Container pane = ((BasicInternalFrameUI) intFrame.getUI()).getNorthPane();
// And remove the button:
pane.remove(0);
// OR make it invisible:
pane.getComponent(0).setVisible(false);