please help, am i missing something simple?

J

JROCKS11

in my code i try extending the HTMLReader Class.

then when i try to compike, i get this error:

an enclosing instance that contains
javax.swing.text.html.HTMLDocument.HTMLReader is required
class DirectionsGrabber extends HTMLReader {

what does this error mean, and how can i fix it?

thanks in advance,
jason
 
A

Anton Spaans

I'm not sure, but try this instead:

class DirectionsGrabber extends HTMLDocument.HTMLReader {
}
 
T

Tony Morris

HTMLReader is a non-static inner class of HTMLDocument.
You need an instance of HTMLDocument to access it.

--
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)
 
H

hiwa

in my code i try extending the HTMLReader Class.

then when i try to compike, i get this error:

an enclosing instance that contains
javax.swing.text.html.HTMLDocument.HTMLReader is required
class DirectionsGrabber extends HTMLReader {

what does this error mean, and how can i fix it?

thanks in advance,
jason

You need your HTMLDocument instantiated, in which you override
getReader() method to return your reader.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top