wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How the heck do you enter a image into a JEditorPane??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How the heck do you enter a image into a JEditorPane???" Watch "How the heck do you enter a image into a JEditorPane???" New topic
Author

How the heck do you enter a image into a JEditorPane???

Escobar Sanchez
Greenhorn

Joined: Aug 22, 2001
Posts: 6
Ive looked everywhere and i cant find info on inserting images in a htmleditor(or jeditorpane). I know its possible cause i can load a web page.
cheers-
Luong Nguyen
Ranch Hand

Joined: May 06, 2001
Posts: 31
You try to use JTextPane.
Escobar Sanchez
Greenhorn

Joined: Aug 22, 2001
Posts: 6
That doesnt exactly help me.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Just because you can load a web page into the JEditorPane does not mean you can load an image. As far as I know, you cannot load an image directly into a JEditorPane.
Why is it that you need to load just a picture? Maybe another component would be better for you.
I don't know, just throwing some ideas. If you can, tell me a little about your app.

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
Escobar Sanchez
Greenhorn

Joined: Aug 22, 2001
Posts: 6
Im making a html editor but i need to be able to enter in images. So far I have all text formatting working fine, but im stuck on this. I've seen some examples at: here and here but i cant make heads or tails out of this. I cant see how this could be so difficult. If i send text in the form of <1mg>http:myimage</1mg> it would work but theres got to be a better way. there just gotsta.
cheers-
[This message has been edited by Escobar Sanchez (edited August 23, 2001).]
[This message has been edited by Escobar Sanchez (edited August 23, 2001).]
 
jQuery in Action, 2nd edition
 
subject: How the heck do you enter a image into a JEditorPane???
 
Similar Threads
JeditorPane
Disable selection from the JEditorPane
HELP with ScrollPanes!
create a html help menu
online help document problem