-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.2.2
-
x86
-
linux
Name: kaC94536 Date: 11/30/99
The following test shows that there are footprints on the borders of JSplitPane
control in the place of previous location of divider after invocation of
resetToPreferredSizes(). This visual effect is observed either on Linux and
Sparc/Solaris JDK 1.2.2. Note that the bug is not observed on Sparc/Solaris JDK
1.3.0.
----------------------------------- test.java ------------------------------------
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class test {
static Frame testFrame = new Frame();
static JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new Panel(),
new
Panel());
static JButton reset = new JButton("resetToPreferredSizes");
static listener1 list1 = new listener1();
public static void main( String[] argv ) {
reset.addActionListener(list1);
pane.setDividerSize(50);
testFrame.setSize(600,300);
testFrame.setLayout(new BorderLayout());
testFrame.add(pane, BorderLayout.CENTER);
testFrame.add(reset, BorderLayout.SOUTH);
testFrame.setVisible(true);
}
static class listener1 implements ActionListener {
public void actionPerformed( ActionEvent e ) {
pane.resetToPreferredSizes();
}
}
}
---------------------------------------------------------------------------------
======================================================================