Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JInternalFrame - Title Bar

7 views
Skip to first unread message

Ian Semmel

unread,
Aug 25, 2008, 2:40:35 PM8/25/08
to
Is it possible to remove the title from a JInternalFrame ?

Larry A Barowski

unread,
Aug 26, 2008, 6:35:25 AM8/26/08
to

"Ian Semmel" <isemme...@NOJUNKrocketcomp.com.au> wrote in message
news:D0Dsk.31254$IK1....@news-server.bigpond.net.au...

> Is it possible to remove the title from a JInternalFrame ?

Not in all cases. For L&Fs that use a BasicInternalFrameUI subclass,
you can use BasicInternalFrameUI.setNorthPane(null) .


Ian Semmel

unread,
Aug 26, 2008, 4:34:36 PM8/26/08
to

That didn't seem to work. Thanks. I will try to use some other component.

Larry A Barowski

unread,
Aug 27, 2008, 10:02:18 AM8/27/08
to

"Ian Semmel" <isemme...@NOJUNKrocketcomp.com.au> wrote in message
news:wNZsk.31521$IK1....@news-server.bigpond.net.au...

>
> That didn't seem to work. Thanks. I will try to use some other component.

What L&F are you using?

You need to do something like (code assumed to be in JInternalFrame
subclass):
javax.swing.plaf.InternalFrameUI ui = getUI();
if (ui instanceof BasicInternalFrameUI)
((BasicInternalFrameUI) ui).setNorthPane(null);

Also, if the UI updates, it will reset, so your JInternalFrame
subclass needs:

public void updateUI() {
super.updateUI();
-- call the method that nulls the title pane or duplicate
-- the code here
}


Ian Semmel

unread,
Aug 27, 2008, 3:24:47 PM8/27/08
to

Thank you, exactly what I needed.

0 new messages