Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
JEditorPane Exception
Meet Gaurav
Ranch Hand
Posts: 492
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
Some one please assist me the reason for the exception, (Its my system issue). Unknown host exception
Am getting at this line..
jeditorPane.setPage(urlObj); //Getting exception at this line
String filePath = "C://text.txt" JEditorPane jeditorPane = new JEditorPane(); jeditorPane.setEditable(false); URL urlObj = new URL("file://" + filePath); if (urlObj != null) { jeditorPane.setPage(urlObj); //Getting exception at this line } else { // Unable to find } jeditorPane.setContentType(jeditorPane.getContentType()); // Business Logic
Rob Spoor
Sheriff
Posts: 22783
131
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Does the error also occur if you use the following code to create the URL:
URL urlObj = new File("C:\\text.txt").toURI().toURL();
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions
How To Answer Questions
Meet Gaurav
Ranch Hand
Posts: 492
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This works fine...
Thanks Rob
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Java Code to Convert RTF to JPG
when are the braces used {}
Java Print
No html page display along with E-mail receive
NX: help need with displaying HTML file with images.
More...