aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/ScrollPane.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/ScrollPane.java')
-rw-r--r--libjava/java/awt/ScrollPane.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/libjava/java/awt/ScrollPane.java b/libjava/java/awt/ScrollPane.java
index b772bee..457df0c 100644
--- a/libjava/java/awt/ScrollPane.java
+++ b/libjava/java/awt/ScrollPane.java
@@ -157,6 +157,9 @@ ScrollPane(int scrollbarDisplayPolicy)
}
wheelScrollingEnabled = true;
+
+ // Default size.
+ setSize(100,100);
}
/*************************************************************************/
@@ -400,6 +403,15 @@ addNotify()
setPeer((ComponentPeer)getToolkit().createScrollPane(this));
super.addNotify();
+
+ Component[] list = getComponents();
+ if (list != null && list.length > 0 && ! (list[0] instanceof Panel))
+ {
+ Panel panel = new Panel();
+ panel.setLayout(new BorderLayout());
+ panel.add(list[0], BorderLayout.CENTER);
+ add(panel);
+ }
}
/*************************************************************************/
@@ -527,7 +539,19 @@ printComponents(Graphics graphics)
public String
paramString()
{
- return(getClass().getName());
+ Insets insets = getInsets();
+ return getName() + ","
+ + getX() + ","
+ + getY() + ","
+ + getWidth() + "x" + getHeight() + ","
+ + "ScrollPosition=(" + scrollPosition.getX() + ","
+ + scrollPosition.getY() + "),"
+ + "Insets=(" + insets.top + ","
+ + insets.left + ","
+ + insets.bottom + ","
+ + insets.right + "),"
+ + "ScrollbarDisplayPolicy=" + getScrollbarDisplayPolicy() + ","
+ + "wheelScrollingEnabled=" + isWheelScrollingEnabled();
}
/**