Menu

#2 F) Using SCROLL_TAB_LAYOUT and an Icon breaks X positioning

closed-fixed
5
2006-05-17
2005-11-21
Anonymous
No

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>

Discussion

  • Steffen Pingel

    Steffen Pingel - 2005-11-21

    Logged In: YES
    user_id=165597

    Thanks for the report. A fix has been comitted to cvs.

     
  • Steffen Pingel

    Steffen Pingel - 2005-11-21
    • assigned_to: nobody --> squig
    • summary: Using SCROLL_TAB_LAYOUT and an Icon breaks [X] positioning --> F) Using SCROLL_TAB_LAYOUT and an Icon breaks X positioning
    • status: open --> open-fixed
     
  • Steffen Pingel

    Steffen Pingel - 2006-05-17
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB