List of usage examples for java.awt Frame setCursor
@Deprecated public void setCursor(int cursorType)
From source file:com.projity.pm.graphic.frames.GraphicManager.java
public void showWaitCursor(boolean show) { Frame frame = getFrame(); if (frame == null) return;/*from w ww.j av a 2s . c o m*/ if (show) frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); else frame.setCursor(Cursor.getDefaultCursor()); }
From source file:us.paulevans.basicxslt.Utils.java
/** * Displays a message dialog// ww w . ja v a2 s . c o m * @param aParent * @param aMsg * @param aTitle * @param aType */ public static void showDialog(Frame aParent, String aMsg, String aTitle, int aType) { aParent.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); JOptionPane.showMessageDialog(aParent, aMsg, aTitle, aType); }
From source file:us.paulevans.basicxslt.Utils.java
/** * Displays an error dialog/*from ww w . j a v a2s . com*/ * @param aParent * @param aThrowable */ public static void showErrorDialog(Frame aParent, Throwable aThrowable) { String message; Throwable throwableToReport; throwableToReport = ExceptionUtils.getRootCause(aThrowable); if (throwableToReport == null) { throwableToReport = aThrowable; } message = throwableToReport.getMessage(); if (StringUtils.isBlank(message)) { message = ExceptionUtils.getStackTrace(throwableToReport); } if (aParent != null) { aParent.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } JOptionPane.showMessageDialog(aParent, MessageFormat.format(stringFactory.getString(LabelStringFactory.ERRORS_MESSAGE), message, AppConstants.BUG_HOME_URL), stringFactory.getString(LabelStringFactory.ERRORS_TITLE), JOptionPane.ERROR_MESSAGE); }