summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2006-01-19 22:27:27 +0000
committerRoman Kennke <roman@kennke.org>2006-01-19 22:27:27 +0000
commit86011b0050bef180a47dc4bb764cc97dc3a1b33c (patch)
tree7c316ff609e02245f9ca0e06b747dd1a5be29679
parent985a1e16693e9e6a9d582269eba8e5c4be94e098 (diff)
downloadclasspath-86011b0050bef180a47dc4bb764cc97dc3a1b33c.tar.gz
2006-01-19 Roman Kennke <kennke@aicas.com>
* javax/swing/JWindow.java (JWindow(Window)): Fixed to accept null owner argument. (JWindow(Window,GraphicsConfiguration)): Fixed to accept null owner argument. * javax/swing/SwingUtilities.java (getOwnerFrame): Owner parameter and return value are fixed to be of type Window for compatibity with the above JWindow constructor. * javax/swing/JDialog.java (JDialog): Added cast to Frame to make sure the correct constructor is called. * javax/swing/JFileChooser.java (createDialog): Added cast to Frame for JDialog constructor.
-rw-r--r--ChangeLog16
-rw-r--r--javax/swing/JDialog.java4
-rw-r--r--javax/swing/JFileChooser.java2
-rw-r--r--javax/swing/JWindow.java4
-rw-r--r--javax/swing/SwingUtilities.java4
5 files changed, 23 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d8b55414..9068ea9c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2006-01-19 Roman Kennke <kennke@aicas.com>
+
+ * javax/swing/JWindow.java
+ (JWindow(Window)): Fixed to accept null owner argument.
+ (JWindow(Window,GraphicsConfiguration)): Fixed to accept null
+ owner argument.
+ * javax/swing/SwingUtilities.java
+ (getOwnerFrame): Owner parameter and return value are fixed to
+ be of type Window for compatibity with the above JWindow
+ constructor.
+ * javax/swing/JDialog.java
+ (JDialog): Added cast to Frame to make sure the correct constructor
+ is called.
+ * javax/swing/JFileChooser.java
+ (createDialog): Added cast to Frame for JDialog constructor.
+
2006-01-19 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* javax/swing/JTable.java (rowAtPoint): Rewritten.
diff --git a/javax/swing/JDialog.java b/javax/swing/JDialog.java
index f1305aad4..d8d395a29 100644
--- a/javax/swing/JDialog.java
+++ b/javax/swing/JDialog.java
@@ -107,7 +107,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
*/
public JDialog()
{
- this(SwingUtilities.getOwnerFrame(null), "", false, null);
+ this((Frame) SwingUtilities.getOwnerFrame(null), "", false, null);
}
/**
@@ -234,7 +234,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
public JDialog(Frame owner, String title, boolean modal,
GraphicsConfiguration gc)
{
- super(SwingUtilities.getOwnerFrame(owner), title, modal, gc);
+ super((Frame) SwingUtilities.getOwnerFrame(owner), title, modal, gc);
dialogInit();
}
diff --git a/javax/swing/JFileChooser.java b/javax/swing/JFileChooser.java
index a7ef1e760..72bd2bb28 100644
--- a/javax/swing/JFileChooser.java
+++ b/javax/swing/JFileChooser.java
@@ -725,7 +725,7 @@ public class JFileChooser extends JComponent implements Accessible
{
Frame toUse = (Frame) SwingUtilities.getAncestorOfClass(Frame.class, parent);
if (toUse == null)
- toUse = SwingUtilities.getOwnerFrame(null);
+ toUse = (Frame) SwingUtilities.getOwnerFrame(null);
JDialog dialog = new JDialog(toUse);
setSelectedFile(null);
diff --git a/javax/swing/JWindow.java b/javax/swing/JWindow.java
index b4852542c..8fffd9d52 100644
--- a/javax/swing/JWindow.java
+++ b/javax/swing/JWindow.java
@@ -133,7 +133,7 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
*/
public JWindow(Window owner)
{
- super(owner);
+ super(SwingUtilities.getOwnerFrame(owner));
windowInit();
}
@@ -152,7 +152,7 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
*/
public JWindow(Window owner, GraphicsConfiguration gc)
{
- super(owner, gc);
+ super(SwingUtilities.getOwnerFrame(owner), gc);
windowInit();
}
diff --git a/javax/swing/SwingUtilities.java b/javax/swing/SwingUtilities.java
index bba27a289..af4ae040a 100644
--- a/javax/swing/SwingUtilities.java
+++ b/javax/swing/SwingUtilities.java
@@ -1021,9 +1021,9 @@ public class SwingUtilities
*
* @return The common Frame
*/
- static Frame getOwnerFrame(Frame owner)
+ static Window getOwnerFrame(Window owner)
{
- Frame result = owner;
+ Window result = owner;
if (result == null)
{
if (ownerFrame == null)