aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/GridBagConstraints.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/GridBagConstraints.java')
-rw-r--r--libjava/java/awt/GridBagConstraints.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/libjava/java/awt/GridBagConstraints.java b/libjava/java/awt/GridBagConstraints.java
index c91ed09..dd72a51 100644
--- a/libjava/java/awt/GridBagConstraints.java
+++ b/libjava/java/awt/GridBagConstraints.java
@@ -1,6 +1,6 @@
// GridBagConstraints.java - Constraints for GridBag layout manager
-/* Copyright (C) 2000, 2001 Free Software Foundation
+/* Copyright (C) 2000, 2001, 2002 Free Software Foundation
This file is part of GNU Classpath.
@@ -93,9 +93,17 @@ public class GridBagConstraints implements Cloneable, Serializable
/** Create a copy of this object. */
public Object clone ()
{
- GridBagConstraints g = (GridBagConstraints) super.clone ();
- g.insets = (Insets) insets.clone ();
- return g;
+ try
+ {
+ GridBagConstraints g = (GridBagConstraints) super.clone ();
+ g.insets = (Insets) insets.clone ();
+ return g;
+ }
+ catch (CloneNotSupportedException _)
+ {
+ // Can't happen.
+ return null;
+ }
}
/** Create a new GridBagConstraints object with the default