0

Does anyone know how to remove the title bar of a JInternalFrame?

I already know to set frame.setBorder(null); to remove the borders, but the title bar remains. I hope you can help.

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
Saint-Clair
  • 59
  • 3
  • 10

1 Answers1

1

As simple as that..

jInternalFrame1.setUI(null);

Try.. Thanks..

Java Man
  • 1,854
  • 3
  • 21
  • 43
  • 1
    ... removing the delegate is *wrong always*, it will silently have odd effects (nothing of the internalFrame-ness will survive), be re-installed equally silently the next time the LAF is toggled (or internals feel like calling updataUI) – kleopatra Jan 31 '14 at 11:39
  • 2
    @kleopatra If you know a better approach, or perhaps that it's not possible, do you have time to add an answer to [the duplicate question](http://stackoverflow.com/questions/7218608/hiding-title-bar-of-jinternalframe-java) so that this knowledge is not lost. – Duncan Jones Jan 31 '14 at 11:49
  • @Duncan the basic technical answer is to remove/replace the northPane (and not forget to do it again after minimizing and some other caveats) - so without knowing _why_ the OP wants to not show it the question simply is not answerable. Anyway, whatever the requirement, this answer is plain wrong (as is the similar answer to the duplicate ;-) – kleopatra Jan 31 '14 at 12:43