changeset 3325:ad7feec4413e

6813208: pageDialog throws NPE from applet Reviewed-by: ant, minqi
author miroslawzn
date Wed, 08 Dec 2010 15:04:41 -0800
parents 47cd69eff641
children 90dcea60577e
files src/windows/classes/sun/awt/windows/WFileDialogPeer.java src/windows/classes/sun/awt/windows/WPrintDialogPeer.java
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Mon Dec 06 21:45:48 2010 -0800
+++ b/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Wed Dec 08 15:04:41 2010 -0800
@@ -35,6 +35,7 @@
 import java.util.MissingResourceException;
 import java.util.Vector;
 import sun.awt.AppContext;
+import sun.awt.CausedFocusEvent;
 import sun.awt.AWTAccessor;
 
 public class WFileDialogPeer extends WWindowPeer implements FileDialogPeer {
@@ -252,6 +253,14 @@
                                 boolean focusedWindowChangeAllowed) {
         return false;
     }
+
+    public boolean requestFocus
+         (Component lightweightChild, boolean temporary,
+          boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)
+    {
+        return false;
+    }
+
     void start() {}
     public void beginValidate() {}
     public void endValidate() {}
--- a/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java	Mon Dec 06 21:45:48 2010 -0800
+++ b/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java	Wed Dec 08 15:04:41 2010 -0800
@@ -31,6 +31,7 @@
 import java.awt.dnd.DropTarget;
 import java.util.Vector;
 import sun.awt.AppContext;
+import sun.awt.CausedFocusEvent;
 import sun.awt.AWTAccessor;
 
 public class WPrintDialogPeer extends WWindowPeer implements DialogPeer {
@@ -131,6 +132,15 @@
     public boolean requestFocus(boolean temporary, boolean focusedWindowChangeAllowed) {
         return false;
     }
+
+    public boolean requestFocus
+         (Component lightweightChild, boolean temporary,
+          boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)
+    {
+
+        return false;
+    }
+
     public void updateFocusableWindowState() {}
     void start() {}
     public void beginValidate() {}