2

I have been looking through all properties and cant figure out how to remove it. The GUI was generated with netbeans. Does anybody know how to remove that pesky thing?

I don't have enough reputation to post the image, so here is a link to help understand the exact problem.

Image

mKorbel
  • 109,525
  • 20
  • 134
  • 319
asd
  • 47
  • 8

2 Answers2

4

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);
icza
  • 389,944
  • 63
  • 907
  • 827
0

You can try with this

internalframe.setFrameIcon(null);

And here is a good example.

Community
  • 1
  • 1
codebot
  • 2,540
  • 3
  • 38
  • 89