please help, am i missing something simple?

Discussion in 'Java' started by JROCKS11, Jan 28, 2004.

  1. JROCKS11

    JROCKS11 Guest

    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
    JROCKS11, Jan 28, 2004
    #1
    1. Advertising

  2. JROCKS11

    Anton Spaans Guest

    I'm not sure, but try this instead:

    class DirectionsGrabber extends HTMLDocument.HTMLReader {
    }

    "JROCKS11" <> wrote in message
    news:...
    >
    > 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
    Anton Spaans, Jan 28, 2004
    #2
    1. Advertising

  3. Andrew Thompson, Jan 28, 2004
    #3
  4. JROCKS11

    Tony Morris Guest

    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)


    "JROCKS11" <> wrote in message
    news:...
    >
    > 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
    Tony Morris, Jan 28, 2004
    #4
  5. JROCKS11

    hiwa Guest

    (JROCKS11) wrote in message news:<>...
    > 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.
    hiwa, Jan 29, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: I'm missing something simple

    Kevin Spencer, May 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    307
    =?Utf-8?B?Y2N1cnZleQ==?=
    May 20, 2004
  2. luca passani

    must be missing something simple...

    luca passani, Sep 5, 2003, in forum: Java
    Replies:
    1
    Views:
    615
    luca passani
    Sep 5, 2003
  3. SB
    Replies:
    6
    Views:
    310
    Old Wolf
    Apr 23, 2004
  4. John Abel

    Missing Something Simple

    John Abel, Jul 12, 2005, in forum: Python
    Replies:
    2
    Views:
    261
    Dennis Lee Bieber
    Jul 12, 2005
  5. B. Angell
    Replies:
    4
    Views:
    74
    William James
    Aug 16, 2005
Loading...

Share This Page