Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8369341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:37:07+00:00 2026-06-09T13:37:07+00:00

while looking for a simple way to display errors I’ve found SwingX Currently I’m

  • 0

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)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:37:08+00:00Added an answer on June 9, 2026 at 1:37 pm

    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:

        Exception e = new NullPointerException("something ...");
        // copied from BasicErrorPaneUI
        StringBuffer html = new StringBuffer("<html>");
        html.append("<h2>" + "Error" + "</h2>");
        html.append("<HR size='1' noshade>");
        html.append("<div></div>");
        html.append("<b>Message:</b>");
        html.append("<pre>");
        html.append("    " + e.toString());
        html.append("</pre>");
        html.append("<b>Level:</b>");
        html.append("<pre>");
        html.append("    " + ErrorLevel.SEVERE);
        html.append("</pre>");
        html.append("</html>");
    
        ErrorInfo errorInfo = new ErrorInfo("Error", e.getMessage(), 
                html.toString(), null, e, ErrorLevel.SEVERE, null);
        JXErrorPane.showDialog(null, errorInfo);
    

    If you want to do that more often, I would suggest a custom ErrorInfo subclass

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been Googling for a while looking for a simple way to do this,
I'm looking for a simple way using php and javascript, to print a php
My problem is very simple, yet I feel lost while looking at it ...
I started looking into PhoneGap yesterday and created a simple marble rolling around while
while looking at some code I stumbled onto: throw /*-->*/new std::exception (//... and I
While looking for a way to temporarily save the search results when a user
I am looking for a way to display other data in a MaskedTextBox than
I'm looking for a clean way to handle null object references in LINQ to
I'm looking for a simple & semantic way to code jQuery event handlers that
I am looking for the most efficient/direct way to do this simple C/C++ operation:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.