src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolBarUI.java
Print this page
@@ -86,11 +86,11 @@
private JMenuBar lastMenuBar;
/**
* Registers the specified component.
*/
- synchronized static void register(JComponent c) {
+ static synchronized void register(JComponent c) {
if (c == null) {
// Exception is thrown as convenience for callers that are
// typed to throw an NPE.
throw new NullPointerException("JComponent must be non-null");
}
@@ -98,11 +98,11 @@
}
/**
* Unregisters the specified component.
*/
- synchronized static void unregister(JComponent c) {
+ static synchronized void unregister(JComponent c) {
for (int counter = components.size() - 1; counter >= 0; counter--) {
// Search for the component, removing any flushed references
// along the way.
JComponent target = components.get(counter).get();
@@ -114,11 +114,11 @@
/**
* Finds a previously registered component of class <code>target</code>
* that shares the JRootPane ancestor of <code>from</code>.
*/
- synchronized static Object findRegisteredComponentOfType(JComponent from,
+ static synchronized Object findRegisteredComponentOfType(JComponent from,
Class<?> target) {
JRootPane rp = SwingUtilities.getRootPane(from);
if (rp != null) {
for (int counter = components.size() - 1; counter >= 0; counter--){
Object component = ((WeakReference)components.get(counter)).