Home > Default > Image through HTML in JTextPane

Image through HTML in JTextPane

November 30Hits:0
Advertisement
I am using a properties-file to get an HTML string which holds an image. I am displaying it in a JTextPane. The HTML works except for the image which is displayed as a broken link.
Could it be a document base-problem (I tried using the absolute path with no luck)?

Answers

I got it myself... missed the "file///" in front of the path...

Read other 2 answers

Tags:

Related Articles

  • ComponentView does not redraw component in JTextPane Cell RendOctober 11

    We have created a JTable implementation that uses JTextPanes as cell renderers/editors so that text styles and the like are available. We want insert a component, such as a JButton, into the JTextPane. However, the component is only visible when the

  • Problem with JTextPane and StateInvariantErrorOctober 11

    Hi. I am having a problem with JTextPanes and changing only certain text to bold. I am writing a chat program and would like to allow users to make certain text in their entries bold. The best way I can think of to do this is to add <b> and </b&g

  • How to give styles to my HTMLDocument inside a JTextPane?October 11

    I have a JTextPane with a HTMLDocument attached to it. How can I style the text which is typed in? For example I want to set a larger font. How can I do this in my example? Another problem is that when I hit the alignment buttons the text is actually

  • Multi-document Application using JTextPane - IssueOctober 11

    Hi. I'm making a java IDE as a class assignment where the user opens a certain project and all associated files open (i.e. all files in the requested folder). Opening is not an issue but here's the real problem. When a file opens (in the JTextPane),

  • How to prevent JTextPane from inserting newline on setText(longLine)October 11

    Hi all, I have seen some posts (referenced below) regarding JTextPane and turning off line wrap. I tried these but still have some unwanted behavior. If I insert long html content that has no CRs in it into a JTextPane, using setText(...) and then im

  • How to get exact height of HTML line with SUB tag in JTextPane?October 11

    Hi, this is my first post. I`ve been searching forum for an answer for a week, but didn`t find one. I have HTMLDocument inside JTextPane(exacty inside my class that extends it - MyTextPane). I want to do some custom painting in JTextPane so I need to

  • Display image in JTextPane (JEditorPane)October 11

    I'm writing an application with JTable and a JTextPane. When selecting a column in the JTable, I want to display the image associated with the selected row in the JTextPane. This wouldn't be a problem if the darn JTextPane would just display JUST AN

  • Line Number in JTextPaneOctober 11

    Hi Experts; How do I add a caret listener on this code so that it will just add a number when the user goes to the next line. import java.awt.*; import javax.swing.*; public class LineNumber extends JComponent      private final static Color DEFAULT_

  • Bug in JTextArea/JTextPane ??October 11

    Hi, I am facing huge memory leak problems with JTextArea/JTextPane. After considerable investigation, I found out that the Document associated with the component is not being GC'ed properly. I ran OptimizeIt and found out that the memory is being con

  • How Do I Make Text Colored in a JTextPaneOctober 11

    I currently have a program that uses a JTextArea to display text that the user has typed into a Text Field. This is working and i now want to be able to make parts of this text different colors. I was looking in the tutorials and it looks like i need

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.584 s.