jeditorpane

JEditorPane - make tabs spaces

I'm wondering if there's a way to have tabs convert to spaces in a jeditorpane, much like you'd see when working in an IDE. I don't want to set the tab size. I can already do that easily. I want to have tabs replaced with their equivalent in spaces. So for example if my tabs are 5 spaces long, I would want all tabs replaced immediately ...

JEditorPane onReady?

how can I perform an action when the JEditorPane is done loading a webpage from an url? is this even possible? i'm unable to find anything about this online :s thank you ...

Occasional distorted display when scrolling text using JScrollPane

I have an application that displays text in a JEditorPane contained within a JScrollPane. 60 users have this application. Occasionally on one user's machine, when she scrolls the text the display suddenly becomes distorted. Part of the the text appears the way it did before the scroll and part of it appears the way it did after th...

I have extended jEditorPane to contain and display a bufferedimage from memory, but it does not paint properly. What am I doing wrong?

I have extended jEditorPane as shown below (minus the instantiation code). However, when I set the image and call update on the object, it only draws a small portion of the image (equivalent to where one line of text would go). Can somene tell me what I am doing wrong here? public class JEditorPaneImg extends JEditorPane { private Buff...

Insert HTML into the Body of an HTMLDocument

This seems like such a simple question, but I'm having such difficulty with it. Problem: I have some text to insert into an HTMLDocument. This text sometimes specifies some html as well. E.G.: Some <br />Random <b>HTML</b> I'm using HTMLEditorKit.insertHTML to insert it at a specified offset. This works fine, unless the offset is ...

Formatting text with HTML in a JEditorPane?

Hello all, I am trying to make a simple email client in Java Swing. I want to allow users to format their email in any way they want, like making some parts of the text bold, other parts italic, etc. In other words, I am trying to make a WYSIWYG editor. The formatting is done in HTML. I am using JEditorPane to display the text. I have...

Java - How do I modify a hyperlink attribute from an HTML document loaded into jEditorPane?

I am creating a start page for my application and it use jEditorPane to load an HTML document. I have it detecting hyperlink "ENTER" "EXIT" and "ACTIVATED". I know how to get an attribute of the link but how do I change an attribute. I would like to impliment a rollover effect so when ENTER is fired off it changes the links style to have...

HTMLEditorKit replacement

I have problem with HTMLEditorKit failing at parsing some webpages (in HTML3!! with NumberFormatException) or being really slow on other pages (takes up to one minute to render). Is there any good HTMLEditorKit replacement? Editor or viewer, free or commercial, for Windows and Mac OS X. Thanks ...

syntax highlighting in JEditorPane

i want to do tag hightlighting in jeditorpane. if i load a html file in jeditorpane then it should automatically highlight all tags with red foreground color... for ex. &l tHTML &gt ...

Using HtmlElement with HTMLDocument referencing a jEditPane that contains HTML to modify elements?

I am writing a start page for my app in HTML, and I know using jEditPane I can render HTML. I know a little about how to use HTMLEditorKit and how to convert the jEditPane document to an HTMLDocument, but how do I select and change elements on the HTML page? I see there is something called HTMLElement but I don't know how to use it in th...

Problem copying HTML from JEditorPane to external applications

Hello! I'm having trouble copying HTML from JEditorPane to system clipboard and then pasting into other applications: OpenOffice 3.2 - Says "Requested clipboard format isn't available" Thunderbird 3.13 - Does nothing on paste Firefox 3.6.9 - Accepts plain text but for example in GMail "Compose mail" does nothing on paste I'm running ...

pre-wrap in a JEditorPane

I am using a JEditorPane to show styled text and I am also using the <pre> tag to preserve all the whitespaces in the text. The problem is that I want to have the JEditorPane to wrap the text lines, but the HTMLEditorKit (or a related class) does not wrap text inside a <pre> tag. What I mean is that I want a behavior simitar to the styl...

JEditorPane doesn't display special separators while reading by BufferedReader

I am creating a custom XML editor. My xml file contains lots of special separators such as ¦ • ¥ ‡ § and such other. But when I read a file and display in JEditorPane it doesn't read it and displays something else such as • for • and some weird characters. So how can read and display a file as it is. below is the code i have writen to ...

expand collapse JeditorPane

I am creating a XMl editor. I want the JeditorPane to have expand collapse feature accoring to nodes.. If anybody is having any idea how to do it please tell... ...

Problematic tags displaying HTML in Java

Hi again, I have the following tag included in my HTML which causes the JEditorPane not to show the HTML output. <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> Not so much a big deal but anyone know why this would happen? Cannot find too much documentation on this - best I came up with was someone having a go a ...

How do I catch a java.io.PrintStream place its output in a JEditorPane?

I am attempting to make a Java program in which a user can select any .class or .jar file from their computer. My program will then pop up a JInternalFrame with a JEditorPane in it as the console, capturing any console output from the user's program. Note that I do not want to capture just System.err or System.out calls, but ALL PrintStr...