Help save net neutrality! Learn more.

#1728 BufferTabs reorders the tabs


jEdit version number:

BufferTabs plugin and version numbers:

windows (win 7)

Java version:

currently the tabs are reordered without any reason (or is it a java feature?)

steps to reproduce:
1. open files to fill 1 line BufferTabs on top of the screen
2. open one more file

expected result:
- the older file's tab should be remained on their place
- only the new file's tab should be appeared in the new tab line


  • drvdrv

    drvdrv - 2013-08-13

    tabs before and after open new file

  • Alan Ezust

    Alan Ezust - 2013-11-16

    Under Global options - View, do you have the option 'Sort buffer sets' un-checked?
    What bufferset scope do you use? Did you have multiple views or editpanes open?

  • drvdrv

    drvdrv - 2013-11-18

    Maybe the title of bug is not correct. So there is no real reordering just new (and older existing tab(s)) are moved to the next row.
    It does not matter if 'Sort buffer sets' is checked or un-checked. And the scope is also irrelevant.

    I did some experiments, and now I am sure that this is the java default behavior (but why???). Try the code bellow. Start it and re-size the window (decrease the width). When there is no space enough for all tabs, not only the last tab will be moved to the next row but more. In forums I have found some hint how to solve this but it is beyond my java knowledge.

    I hope now it is clear what I mean. (Anyway, this is still really annoying. When opening/closing tabs and this happens, I usually lost and I have to start finding the wanted tabs again)

    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JTabbedPane;

    public class TestTabbedPane extends JTabbedPane {
    public static void main(String[] args) {
    JFrame test = new JFrame("Tab test");
    test.setSize(600, 400);

    TestTabbedPane tabs = new TestTabbedPane();

    tabs.addTab("One 11111111", new JButton("One"));
    tabs.addTab("Two 2222", new JButton("Two"));
    tabs.addTab("Three 33333", new JButton("Three"));
    tabs.addTab("Four 4444444444", new JButton("Four"));
    tabs.addTab("Five 555", new JButton("Four"));

  • Matthieu Casanova

    It is a feature of tabs in java, we have the choice to wrap taps on new line or add a scrolling when there are too many tabs.

  • drvdrv

    drvdrv - 2013-11-18

    or, as far as understood, implement a tabbedPane with custom behavior (rendering or sg).
    But of course I know that easy to say (write) this.

  • drvdrv

    drvdrv - 2013-11-27

    Meanwhile I install the LookAndFeel plugin. With Jgoodies L&F the tabbedPane works as I expect, however I do not like its look.
    So the solution is somewhere there.

  • Alan Ezust

    Alan Ezust - 2014-12-20
    • status: open --> closed-wont-fix
    • Group: -->
  • Alan Ezust

    Alan Ezust - 2014-12-20

    Closing since this seems to be a complaint about how Java tabbed panes work in certain look and feels, rather than something that can be fixed in jEdit.


Log in to post a comment.