22 package com.realtime.crossfire.jxclient.util;
24 import java.lang.reflect.InvocationTargetException;
25 import javax.swing.SwingUtilities;
26 import org.jetbrains.annotations.NotNull;
46 if (SwingUtilities.isEventDispatchThread()) {
50 SwingUtilities.invokeAndWait(runnable);
51 }
catch (
final InterruptedException ignored) {
52 Thread.currentThread().interrupt();
53 }
catch (
final InvocationTargetException ex) {
54 throw new AssertionError(ex);
64 public static void invokeLater(@NotNull
final Runnable runnable) {
65 if (SwingUtilities.isEventDispatchThread()) {
68 SwingUtilities.invokeLater(runnable);
SwingUtilities2()
Private constructor to prevent instantiation.
static void invokeLater(@NotNull final Runnable runnable)
Calls SwingUtilities#invokeLater(Runnable) if not on the EDT or calls the Runnable directly if on the...
Utility class for Swing related functions.
static void invokeAndWait(@NotNull final Runnable runnable)
Calls SwingUtilities#invokeAndWait(Runnable) if not on the EDT or calls the Runnable directly if on t...