@@ -461,24 +461,25 @@ else if (key.equals(UPPER_RIGHT_CORNER)) {
461461 * <p>Note that the rowHeader is calculated as part of the preferred width
462462 * and the colHeader is calculated as part of the preferred size.
463463 *
464- * @param parent the <code>Container</code> that will be laid out
464+ * @param container the <code>Container</code> that will be laid out
465465 * @return a <code>Dimension</code> object specifying the preferred size of the
466466 * viewport and any scrollbars
467467 * @see ViewportLayout
468468 * @see LayoutManager
469469 */
470- public Dimension preferredLayoutSize (Container parent )
470+ public Dimension preferredLayoutSize (Container container )
471471 {
472472 /* Sync the (now obsolete) policy fields with the
473473 * JScrollPane.
474474 */
475- JScrollPane scrollPane = (JScrollPane )parent ;
475+ JScrollPane scrollPane = (JScrollPane )container ;
476476 vsbPolicy = scrollPane .getVerticalScrollBarPolicy ();
477477 hsbPolicy = scrollPane .getHorizontalScrollBarPolicy ();
478478
479479 // BH -- this was a problem when the scrollpane was in a split pane in SetXMLControlElement test OSP
480- Insets insets = new Insets (0 ,0 ,0 ,0 );//
481- // parent.getInsets(); because these are interior?
480+ Insets insets = //new Insets(0,0,0,0);//
481+ container .getInsets ();
482+ //because these are interior?
482483 int prefWidth = insets .left + insets .right ;
483484 int prefHeight = insets .top + insets .bottom ;
484485
@@ -512,7 +513,7 @@ public Dimension preferredLayoutSize(Container parent)
512513
513514 Border viewportBorder = scrollPane .getViewportBorder ();
514515 if (viewportBorder != null ) {
515- Insets vpbInsets = viewportBorder .getBorderInsets (parent );
516+ Insets vpbInsets = viewportBorder .getBorderInsets (container );
516517 prefWidth += vpbInsets .left + vpbInsets .right ;
517518 prefHeight += vpbInsets .top + vpbInsets .bottom ;
518519 }
0 commit comments