Results 1 to 6 of 6

Thread: setPage

  1. #1
    prof.deedee is offline Member
    Join Date
    Oct 2009
    Posts
    36
    Rep Power
    0

    Default setPage

    Hi
    I need to create my setPage method which do same as setPage that load HTML pages... the problem is that I can't know the steps that setPage follow and try to do like it?????
    can anyone help me???
    setPage need jEditorPane to invoke it and no problem with this but how can I use setText or any other method instead of setPage.....?????:confused:

  2. #2
    zweibieren is offline Senior Member
    Join Date
    Aug 2009
    Location
    Pittsburgh, PA
    Posts
    284
    Rep Power
    6

    Default

    You can call setText(); so clearly I do not understand what you want to do.
    Perhaps you want to load HTML from a file instead of a web page.
    This can be done with setPage(fileURL),
    where fileURL is an URL that has been created to refer to that file.
    The file can be on the local machine.

  3. #3
    prof.deedee is offline Member
    Join Date
    Oct 2009
    Posts
    36
    Rep Power
    0

    Default

    thank u for helping me but can u explain more..
    or am I understand setPage correctly?? because I think it work like this:
    when I send URL to it then:
    1-it will open socket with the host of that URL
    2-read the server response for that connection
    3-delete tags and save the page lines itself into file
    4-read from that file line by line and use setText to display that lines

  4. #4
    zweibieren is offline Senior Member
    Join Date
    Aug 2009
    Location
    Pittsburgh, PA
    Posts
    284
    Rep Power
    6

    Default

    Perhaps we should start further back.
    Tell us about your application.
    What document or text will it display?
    Where is that document and what is its format?
    Where will the document appear within the application?
    What will a user be able to do with the document? Read? Edit? Save?

    Why do you think you need to write something 'like' setPage()?
    Why not use setPage() itself?

  5. #5
    prof.deedee is offline Member
    Join Date
    Oct 2009
    Posts
    36
    Rep Power
    0

    Default

    I have to bult my web browser and I can't use setPage method because the professor don't allow us to do that????
    so I need to know what setpage doing to do like it

  6. #6
    zweibieren is offline Senior Member
    Join Date
    Aug 2009
    Location
    Pittsburgh, PA
    Posts
    284
    Rep Power
    6

    Default

    If you want to know what a Java methods does,
    you can get an idea by reading the source code.
    In this case, JEditorPane.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •