while looking for a simple way to display errors I’ve found SwingX
Currently I’m using
JXErrorPane.showDialog(null, new ErrorInfo("Error", e.getMessage(), null, null, exception, ErrorLevel.SEVERE, null));
which results in the following : https://i.stack.imgur.com/4a6jP.png
I really like the way this looks but I don’t want to show the stack trace. I’ve tried passing null instead of the exception but that way I don’t get the details.
Is there any way to just omit the stack trace?
(Like this : https://i.stack.imgur.com/4zmos.png)
If you don’t like the auto-built details message (which is built by the BasicErrorPaneUI, have a look at its getDetailsAsHtml), you can pass-in a custom one like:
If you want to do that more often, I would suggest a custom ErrorInfo subclass