Search code examples
javaswingnetbeans-7jinternalframe

how to remove left side drop down Menu on jinternal frame title Bar java


  1. How to remove or hide the left side Drop Down Menu only on jinternal frame Title Bar and not to remove or hide whole Title Bar.

  2. How to set not Move jinternal frame by mouse holding in jdesktop pane.

Check below snapshot for better understand my question what I want:

http://i49.tinypic.com/1zfned2.jpg


Solution

  • As far as I know, the only way is to use your own UI delegate for the internal frame. See http://today.java.net/pub/a/today/2007/02/22/how-to-write-custom-swing-component.html for an article explaining how UI delegates work.

    Since you seem to use the Synth look n' feel, you should be able to easily create your own subclass of SynthInternalFrameUI, that would override the createNorthPane() method in order to create and return an instance of a custom subclass of SynthInternalFrameTitlePane.

    This custom title pane would in turn override the addSubComponents() method in order to not add the menuButton. I've not tested all that, so maybe you'll need to override additional methods.