dialog.setResizable(true); String details = t.getMessage() + "\r\n" + MiscUtils.getStackTrace(t); optionPane.setDetails(details); dialog.pack();
@Override protected void dispatchEvent(AWTEvent event) { try { super.dispatchEvent(event); } catch (StackOverflowError soe) { log.error(soe, soe); optionPane.setTitle(I18N.getString("MapToolEventQueue.stackOverflow.title")); //$NON-NLS-1$ optionPane.setDetails(I18N.getString("MapToolEventQueue.stackOverflow")); displayPopup(); } catch (Throwable t) { log.error(t, t); optionPane.setTitle(I18N.getString("MapToolEventQueue.unexpectedError")); //$NON-NLS-1$ optionPane.setDetails(toString(t)); try { displayPopup(); } catch (Throwable thrown) { // Displaying the error message using the JideOptionPane has just failed. // Fallback to standard swing dialog. log.error(thrown, thrown); JOptionPane.showMessageDialog(null, toString(thrown), I18N.getString("MapToolEventQueue.unexpectedError"), JOptionPane.ERROR_MESSAGE); } } }
optionPane.setDetails(details); dialog.pack();
dialog.setModal(true); dialog.setResizable(true); optionPane.setDetails(MiscUtils.getStackTrace(x));