src/macosx/classes/com/apple/laf/ScreenMenu.java

Print this page

        

*** 26,47 **** package com.apple.laf; import java.awt.*; import java.awt.event.*; import java.awt.peer.MenuComponentPeer; - import java.security.PrivilegedAction; import java.util.Hashtable; import javax.swing.*; import sun.lwawt.LWToolkit; import sun.lwawt.macosx.*; class ScreenMenu extends Menu implements ContainerListener, ComponentListener, ScreenMenuPropertyHandler { static { ! java.security.AccessController.doPrivileged((PrivilegedAction<?>)new sun.security.action.LoadLibraryAction("awt")); } // screen menu stuff public static native long addMenuListeners(ScreenMenu listener, long nativeMenu); public static native void removeMenuListeners(long modelPtr); --- 26,52 ---- package com.apple.laf; import java.awt.*; import java.awt.event.*; import java.awt.peer.MenuComponentPeer; import java.util.Hashtable; import javax.swing.*; import sun.lwawt.LWToolkit; import sun.lwawt.macosx.*; class ScreenMenu extends Menu implements ContainerListener, ComponentListener, ScreenMenuPropertyHandler { static { ! java.security.AccessController.doPrivileged( ! new java.security.PrivilegedAction<Void>() { ! public Void run() { ! System.loadLibrary("awt"); ! return null; } + }); + } // screen menu stuff public static native long addMenuListeners(ScreenMenu listener, long nativeMenu); public static native void removeMenuListeners(long modelPtr);