Results 1 to 6 of 6
Thread: setPage
- 11-10-2009, 09:20 PM #1
Member
- Join Date
- Oct 2009
- Posts
- 36
- Rep Power
- 0
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:
- 11-10-2009, 11:49 PM #2
Senior Member
- Join Date
- Aug 2009
- Location
- Pittsburgh, PA
- Posts
- 282
- Rep Power
- 4
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.
- 11-11-2009, 12:09 AM #3
Member
- Join Date
- Oct 2009
- Posts
- 36
- Rep Power
- 0
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
- 11-11-2009, 12:31 AM #4
Senior Member
- Join Date
- Aug 2009
- Location
- Pittsburgh, PA
- Posts
- 282
- Rep Power
- 4
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?
- 11-11-2009, 01:08 AM #5
Member
- Join Date
- Oct 2009
- Posts
- 36
- Rep Power
- 0
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
- 11-11-2009, 01:43 AM #6
Senior Member
- Join Date
- Aug 2009
- Location
- Pittsburgh, PA
- Posts
- 282
- Rep Power
- 4
If you want to know what a Java methods does,
you can get an idea by reading the source code.
In this case, JEditorPane.


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks