Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages
Started by Vander
Wed, 06 Jul 2005 10:15
JEditorPane setPage problem
Author: Vander
Date: Wed, 06 Jul 2005 10:15
Date: Wed, 06 Jul 2005 10:15
9 lines
1275 bytes
1275 bytes
In my tests I found that JEditorPane.setPage( URL ) does not work for urls of the "file:/" protocol. Can anybody confirm that? No page is rendered. Interesting enough, when I load the content from the *same* URL, convert it into a String and use JEditorPane.setText( String ) the page displays perfectly. Is this another prove of the poverish implementations of Sun? Suggestions for relieve are welcome!
Re: JEditorPane setPage problem
Author: Vander
Date: Wed, 06 Jul 2005 10:59
Date: Wed, 06 Jul 2005 10:59
17 lines
1690 bytes
1690 bytes
OK, sorry! I didn't work for both file:/ and http:/ protocols. Indeed it works, but differently than "setText()". The problem was that setText() formats the screen size by itself whereas setPage() requires a previous dimensioning of the component size. Apoligize for the suspicions! ;) Vander wrote: > In my tests I found that JEditorPane.setPage( URL ) does not work for > urls of the "file:/" protocol. Can anybody confirm that? > > No page is rendered. Interesting enough, when I load the content from > the *same* URL, convert it into a String and use JEditorPane.setText( > String ) the page displays perfectly. > > Is this another prove of the poverish implementations of Sun? > Suggestions for relieve are welcome!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads