changeset 14338:9339eb17a38d

8154088: [macosx] SWT does not work on JDK 9 since b65 Reviewed-by: prr
author serb
date Fri, 22 Apr 2016 01:59:35 +0300
parents 0c5d27b173f7
children 6d60dfa5e3f8
files src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java
diffstat 1 files changed, 13 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	Thu Apr 21 10:30:43 2016 -0700
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewEmbeddedFrame.java	Fri Apr 22 01:59:35 2016 +0300
@@ -87,23 +87,22 @@
         }
     }
 
-    /*
+    /**
      * Initializes the embedded frame bounds and validates a component.
-     * Designed to be called from the main thread
-     * This method should be called once from the initialization of the SWT_AWT Bridge
+     * Designed to be called from the main thread. This method should be called
+     * once from the initialization of the SWT_AWT Bridge.
      */
-    public void validateWithBounds(final int x, final int y, final int width, final int height) {
+    public void validateWithBounds(final int x, final int y, final int width,
+                                   final int height) {
         try {
-            final LWWindowPeer peer = AWTAccessor.getComponentAccessor()
-                                                 .getPeer(this);
-            LWCToolkit.invokeAndWait(new Runnable() {
-                @Override
-                public void run() {
-                    peer.setBoundsPrivate(0, 0, width, height);
-                    validate();
-                    setVisible(true);
-                }
+            LWCToolkit.invokeAndWait(() -> {
+                final LWWindowPeer peer = AWTAccessor.getComponentAccessor()
+                                                     .getPeer(this);
+                peer.setBoundsPrivate(0, 0, width, height);
+                validate();
+                setVisible(true);
             }, this);
-        } catch (InvocationTargetException ex) {}
+        } catch (InvocationTargetException ex) {
+        }
     }
 }