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

  • Home
  • SEARCH
  • 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 460775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:54:27+00:00 2026-05-12T22:54:27+00:00

I have a swing application that sends commands to server and receives result in

  • 0

I have a swing application that sends commands to server and receives result in XML format. I need to transform this into HTML via XSLT and then display result HTML on the panel. The problem is that the only Swing component which is able to display HTML – JEditorPane – takes either URL or javax.swing.text.StyledDocument as a source.
Option with URL doesn’t work for me because I have to save my html as a file on the file system first and I’d like to avoid this.

So I have a gap between in-memory result of XSL transformation and javax.swing.text.StyledDocument, which can be rendered by JEditorPane or JTextPane.

How to transform one to another? Or are there any other Swing solutions to display HTML from some in-memory source(DOM or String or whatever)?

Thank you in advance for help.

  • 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-05-12T22:54:28+00:00Added an answer on May 12, 2026 at 10:54 pm

    Is there a reason that JEditorPane.setText() does not work for you?

    I use JEditorPane all the time and I’ve never pulled the displayed data from a file or URL. So it is possible. Just need to figure out why it’s not working for you.

    To be specific:

    editor.setContentType( "text/html" );    
    editor.setText( "<html><body>Hello, world</body></html>" );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a client side application (Java/Swing) that we need an HTML rendering control
I have this java swing application that I intend to sell over the internet.
I have this requirement for my business. We have a swing desktop application that
We have a Swing application, currently I need to add a feature that is
i have a swing application that i would like to run on os x
I have a Swing application that I would like to convert from spaghetti to
I have a Java Swing application that is being used as a cluster application.
I have a simple Swing Java application that performs searches, and the results are
I have a group of radio buttons in my Swing application that have a
I have a Java swing application with a button that produces a popup window

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.