@@ -0,0 +1,2955 @@
+package org.jdesktop.swingx;%0Aimport java.awt.BorderLayout;%0Aimport java.awt.Color;%0Aimport java.awt.Dimension;%0Aimport java.awt.event.ActionEvent;%0A%0Aimport javax.swing.AbstractAction;%0Aimport javax.swing.JButton;%0Aimport javax.swing.JFrame;%0A%0A%0Aimport org.jdesktop.swingx.JXHeader;%0Aimport org.jdesktop.swingx.JXMultiSplitPane;%0Aimport org.jdesktop.swingx.JXPanel;%0Aimport org.jdesktop.swingx.MultiSplitLayout;%0Aimport org.jdesktop.swingx.MultiSplitLayout.Node;%0A%0Apublic class JXMultiSplitPaneVisualIssues extends InteractiveTestCase %7B%0A%0A%0A    private static void prepare(JFrame f) %7B%0A        prepare(f, MultiSplitLayout.parseModel(%22(ROW (COLUMN weight=0.5 left.top left.bottom)%22 + %0A                %22 (LEAF name=middle)%22 + %0A                %22 (COLUMN weight=0.5 right.top right.bottom))%22));%0A        %0A    %7D%0A    %0A    private static void prepare(JFrame f, Node model) %7B%0A        final JXMultiSplitPane msp;%0A        JXPanel p = new JXPanel(new BorderLayout());%0A        JXHeader header = new JXHeader();%0A        header.setTitle(%22%3Chtml%3E%3CB%3EJXMultiSplitPaneIssue%3C/b%3E%22);%0A        header.setDescription(%22%3Chtml%3EThis is a bit tricky ... To reproduce the issue move one of the dividers and then click reset. Expected behavior is that original layout is restored. Actual behavior (bug) is that only two cells stay displayed and no divider is visible.%22);%0A        p.add(header, BorderLayout.NORTH);%0A        msp = new JXMultiSplitPane();%0A        msp.setModel(model);%0A        p.add(msp);%0A        JButton green = new JButton(%22mid%22);%0A        green.setBackground(Color.GREEN);%0A        msp.add(green, %22middle%22);%0A        msp.add(new JButton(%22l.t%22), %22left.top%22);%0A        msp.add(new JButton(%22l.b%22), %22left.bottom%22);%0A        msp.add(new JButton(%22r.t%22), %22right.top%22);%0A        msp.add(new JButton(%22r.b%22), %22right.bottom%22);%0A        f.add(p);%0A        JButton b = new JButton(new AbstractAction(%22Reset%22) %7B%0A%0A            public void actionPerformed(ActionEvent e) %7B%0A                // just reset the model%0A                msp.setModel(MultiSplitLayout.parseModel(%22(ROW (COLUMN weight=0.5 left.top left.bottom)%22 + %0A                %22 (LEAF name=middle)%22 + %0A                %22 (COLUMN weight=0.5 right.top right.bottom))%22));%0A                msp.revalidate();%0A                msp.repaint();%0A            %7D%0A%0A        %7D);%0A        f.add(b, BorderLayout.SOUTH);%0A        f.setPreferredSize(new Dimension(400, 400));%0A    %7D%0A    %0A    public void interactiveModelChange() %7B%0A        JFrame f = new JFrame();%0A        prepare(f);%0A        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A        f.pack();%0A        f.setVisible(true);%0A    %7D%0A%0A    /**%0A     * @param args%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        JXMultiSplitPaneVisualIssues test = new JXMultiSplitPaneVisualIssues();%0A        try %7B%0A            test.runInteractiveTests();%0A          %7D catch (Exception e) %7B%0A              System.err.println(%22exception when executing interactive tests:%22);%0A              e.printStackTrace();%0A          %7D %0A    %7D%0A%0A%7D%0A

Test exposing MultiSplitPane model reset issue.