11/*
2- * Copyright (c) 1996, 2021 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1996, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -507,7 +507,6 @@ public void layout() {
507507 Component c = getComponent (0 );
508508 Point p = getScrollPosition ();
509509 Dimension cs = calculateChildSize ();
510- Dimension vs = getViewportSize ();
511510
512511 c .reshape (- p .x , - p .y , cs .width , cs .height );
513512 ScrollPanePeer peer = (ScrollPanePeer )this .peer ;
@@ -518,7 +517,7 @@ public void layout() {
518517 // update adjustables... the viewport size may have changed
519518 // with the scrollbars coming or going so the viewport size
520519 // is updated before the adjustables.
521- vs = getViewportSize ();
520+ Dimension vs = getViewportSize ();
522521 hAdjustable .setSpan (0 , cs .width , vs .width );
523522 vAdjustable .setSpan (0 , cs .height , vs .height );
524523 }
@@ -776,7 +775,7 @@ public void adjustmentValueChanged(AdjustmentEvent e) {
776775 }
777776 }
778777
779- private ScrollPane scroller ;
778+ private final ScrollPane scroller ;
780779 }
781780
782781
0 commit comments