RFR: 8316627: JViewport Test headless failure [v3]
Damon Nguyen
dnguyen at openjdk.org
Wed Sep 20 22:03:27 UTC 2023
On Wed, 20 Sep 2023 21:56:50 GMT, Phil Race <prr at openjdk.org> wrote:
>> The adjustmentListener therefore seems irrelevant too.
>
> Seems to me the test reduces to
> import javax.swing.JPanel;
> import javax.swing.JScrollBar;
> import javax.swing.JScrollPane;
>
> public class bug4546474 {
>
> public static void main(String[] args) {
> JPanel panel = new JPanel();
> JScrollPane scrollpane = new JScrollPane(panel,
> JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
> JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
> JScrollBar sbar = scrollpane.getVerticalScrollBar();
> scrollpane.setViewportView(null);
>
> if (sbar.getVisibleAmount() > 0) {
> throw new RuntimeException("Vertical scrollbar is not " +
> "updated when viewport is replaced");
> }
> }
> }
Updated similarly. Thanks
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15847#discussion_r1332224222
More information about the client-libs-dev
mailing list