tredontho
tredontho

Reputation: 1281

Is it possible to remove the little dropdown arrow in a JInternalFrame?

I'm using a JInternalFrame and I want to remove the dropdown in the upper left of the frame, as it serves no purpose (I've disabled resizeable, closable, etc.)

Persistent little dropdown arrow

I don't see a property for this, and I don't want to remove the entire title bar, as the title is necessary. I've looked around online, and basically come up empty here. I'm hoping it's something simple that I've just overlooked, as this is my first time using JInternalFrame, and I'm not exactly a GUI kind of guy to begin with.

Upvotes: 4

Views: 2903

Answers (3)

Wesos de Queso
Wesos de Queso

Reputation: 1572

setFrameIcon(anyBigImageThatCantBeDisplayed);

I´ve tried null parameter and got some visual issues...

enter image description here

So i added a big image(no background) that was already on my resource folder and the icon was no longer displayed as the menu...

enter image description here

Upvotes: 0

camickr
camickr

Reputation: 324098

internalframe.setFrameIcon(null);

Edit: hack to remove system menu in Windows:

BasicInternalFrameUI ui = (BasicInternalFrameUI)internalFrame.getUI();
Container north = (Container)ui.getNorthPane();
north.remove(0);
north.validate();
north.repaint();

Upvotes: 10

trashgod
trashgod

Reputation: 205775

The relevant Icon in The Synth Look and Feel, among the Nimbus Defaults, appears to have this key:

InternalFrame:InternalFrameTitlePane:"InternalFrameTitlePane.menuButton".icon

You may be able to use the approach shown in A Synth Example to replace the Icon.

Upvotes: 1

Related Questions