Take a look at bug id 4320207. There's a problem with the selected tab
being removed from the tab pane. You may want to try setting another
tab to be selected just before you detach it.
--- Michael Roehrl <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I have a JTabbedPane from which I want to drag out some tabs. When
the
> tab is dragged out of the JTabbedPane a JFrame should appear holding
the
> Component that was placed in the tab and the tab should be removed
from
> the JTabbedPane. The whole thing works except that the component is
not
> shown in the new JFrame. Here is the code I am using:
>
> int index = getSelectedIndex();
> if ( index < 0 ) {
> return;
> }
> final Component comp = getComponentAt(index);
> final String title = getTitleAt(index);
> removeTabAt(index);
>
> JFrame frame = new JFrame(title);
> frame.getContentPane().add(comp);
> frame.pack();
> frame.show();
>
> Doing this the tab is correctly removed. The new JFrame has also the
> correct size for the Component, but the component does not show. Does
> anybody know what I am doing wrong?
>
> Thanks in advance
>
> Michael
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing