On Sun, 13 Mar 2022 13:54:47 GMT, Manukumar V S <m...@openjdk.org> wrote:
> Write a regression test for > [JDK-4615365](https://bugs.openjdk.java.net/browse/JDK-4615365) : JSplitPane > current and last divider positions incorrect when realized > > Issue: > JSplitPane component with a left and right component has its current divider > position incorrectly set to -1 once it is fully realized. For JDK 1.3.1, its > value is set to 0. The current position of the divider should be the current > position of the divider once layout management is complete. If the divider is > moved one pixel, the current divider position is updated to the correct value > but the last divider position is then set to -1 (i.e. the last value of the > current divider position). If the divider is moved again, everything is OK. > > Testing: > Java 1.4.0 -> Test Failed. > $ j2sdk1.4.0/bin/java bug4615365 > current= -1, last= 0 > Test Failed. > > Java 1.4.1 -> Test Passed. > $ j2sdk1.4.1/bin/java bug4615365 > current= 97, last= -1 > Test Passed. test/jdk/javax/swing/JSplitPane/4615365/JSplitPaneDividerLocationTest.java line 52: > 50: * @key headful > 51: * @bug 4615365 > 52: * @summary This test confirms that the JSplitPane current and last > divider positions are correct when realized. Please split the long lines to have 80 chars per line. ------------- PR: https://git.openjdk.java.net/jdk/pull/7802