If you configure a large (many tabs) closable tabbed
pane with the SCROLL_TAB_LAYOUT policy, the [X] is not
displayed over the correct tab once you have scrolled
to the right. This only occurs if the tabs have their
own icon as well as text. (Text only tabs work fine).
The following code illustrates ...
CloseableTabbedPane tabs = new CloseableTabbedPane();
tabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
tabs.addTab("Tab #1", new JPanel(),
getIcon("media/world_24.png"), true);
tabs.addTab("Tab #2", new JPanel(),
getIcon("media/clock_24.png"), true);
tabs.addTab("Tab #3", new JPanel(),
getIcon("media/miniuser_24.png"), true);
tabs.addTab("Tab #4", new JPanel(),
getIcon("media/world_24.png"), true);
tabs.addTab("Tab #5", new JPanel(),
getIcon("media/clock_24.png"), true);
tabs.addTab("Tab #6", new JPanel(),
getIcon("media/miniuser_24.png"), true);
tabs.addTab("Tab #7", new JPanel(),
getIcon("media/world_24.png"), true);
Submitted by:
Greg Kopff <gkopff at powersource com au>
Logged In: YES
user_id=165597
Thanks for the report. A fix has been comitted to cvs.