This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JEditorPane and JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JEditorPane and JTextArea" Watch "JEditorPane and JTextArea" New topic
Author

JEditorPane and JTextArea

seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
I have a splitpane. On the left side of the splitpane I have a panel
which has a textarea. On the right side of the splitpane I have another
panel with a JEditorpane. The contents of the JEditor pane is an
html file that has hyperlinks. The hyperlinks are links to some files.
When I click on the hyperlink, I want the particular file to be
displayed in the textarea. At present when I click on the hyperlink,
the file contents are loaded in the JEditorPane. But, I want the
contents to be loaded in the textarea. How do I achieve this?
Please, can anyone give me some inputs how I implement the hypertextListener
sasi kala
Ranch Hand

Joined: Dec 17, 2004
Posts: 68
hi
In hyperlinkUpdate method try to use this code,

Hope This Helps
All The Best
seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
Thanks for the help Sasi Kala, it works !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JEditorPane and JTextArea
 
Similar Threads
How to turn a chat message in an Textarea to a proper line
Question about hyperlink...
Why JeditorPane inside a JScrollPane start from buttom?
get the hyperlink text to another jsp page?
Clicking on HyperLink