-
Bug
-
Resolution: Fixed
-
P2
-
6u10
-
b89
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2192039 | 6u21 | Peter Zhelezniakov | P2 | Closed | Duplicate | |
JDK-2194430 | OpenJDK6 | Peter Zhelezniakov | P3 | Resolved | Fixed | b20 |
Consider this small program:
import java.awt.*;
import javax.swing.*;
public class test {
public static void main(String argv[]) {
JSplitPane c;
c = new JSplitPane(SwingConstants.VERTICAL);
System.out.println(c.isContinuousLayout());
c = new JSplitPane(SwingConstants.HORIZONTAL);
System.out.println(c.isContinuousLayout());
Canvas cv = new Canvas();
JButton bt = new JButton();
c = new JSplitPane(SwingConstants.VERTICAL, cv, bt);
System.out.println(c.isContinuousLayout());
c = new JSplitPane(SwingConstants.HORIZONTAL, cv, bt);
System.out.println(c.isContinuousLayout());
}
}
When run with nimbus l&f it gives wrong results:
[..]$ /export/jdk/jdk1.6.0_18/bin/java -cp . -Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel test
true
true
true
true
[..]$ /export/jdk/jdk1.6.0_18/bin/java -cp . test
false
false
false
false
According to http://java.sun.com/javase/6/docs/api/javax/swing/JSplitPane.html
JSplitPane() -
Creates a new JSplitPane configured to arrange the child components side-by-side horizontally with no continuous layout, using two buttons for the components.
JSplitPane(int newOrientation)
Creates a new JSplitPane configured with the specified orientation and no continuous layout.
JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane with the specified orientation and with the specified components that do not do continuous redrawing.
import java.awt.*;
import javax.swing.*;
public class test {
public static void main(String argv[]) {
JSplitPane c;
c = new JSplitPane(SwingConstants.VERTICAL);
System.out.println(c.isContinuousLayout());
c = new JSplitPane(SwingConstants.HORIZONTAL);
System.out.println(c.isContinuousLayout());
Canvas cv = new Canvas();
JButton bt = new JButton();
c = new JSplitPane(SwingConstants.VERTICAL, cv, bt);
System.out.println(c.isContinuousLayout());
c = new JSplitPane(SwingConstants.HORIZONTAL, cv, bt);
System.out.println(c.isContinuousLayout());
}
}
When run with nimbus l&f it gives wrong results:
[..]$ /export/jdk/jdk1.6.0_18/bin/java -cp . -Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel test
true
true
true
true
[..]$ /export/jdk/jdk1.6.0_18/bin/java -cp . test
false
false
false
false
According to http://java.sun.com/javase/6/docs/api/javax/swing/JSplitPane.html
JSplitPane() -
Creates a new JSplitPane configured to arrange the child components side-by-side horizontally with no continuous layout, using two buttons for the components.
JSplitPane(int newOrientation)
Creates a new JSplitPane configured with the specified orientation and no continuous layout.
JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane with the specified orientation and with the specified components that do not do continuous redrawing.
- backported by
-
JDK-2194430 NIMBUS: 3 constructors of JSplitPane creates new jsp with continuous layout - they should not.
- Resolved
-
JDK-2192039 NIMBUS: 3 constructors of JSplitPane creates new jsp with continuous layout - they should not.
- Closed
- duplicates
-
JDK-6940250 Nimbus: JSplitPane doesn't work as expected
- Closed
- relates to
-
JDK-6937415 Some components return undocumented default values under Nimbus LaF
- Closed
-
JDK-6960808 OpenJDK 6 Nimbus build failure
- Resolved