Well, you asked how to create an HTML parser; the javax.swing.text.html.HTMLEditorKit class can be used to do that (I'm assuming you've read its javadocs by now).
How you plan to use that HTML parser is something you haven't told us. Should we take it that you still plan to build a Java browser? Since we've already established that a full browser that can handle all modern web pages is not feasible, what subset of functionality are you planning for it to have?
Obviously it's possible - that's what web browsers do
You already know of two Java libraries/classes that do that - JEditorPane and Lobo. Source code for both is available, so you can study how they do it (to the extent that's allowed for your project work).
Just terminate the thread that loads the page. (I'm assuming that you *are* using a separate thread for downloading a page, since that kind of thing should not be done in the UI thread. If you are not yet using a separate thread, start by making it so.)
If this a way of saying "Please point me to some code that does this."? If so, you may want to phrase it that way; as it is, it sounds a bit as if an order is given. Also note that JavaRanch is NotACodeMill.
i want to check icon image of button at run time and according to it i need to take action.. i'm doing this for 'reload this page' and 'stop loading this page' as in google chrome Browser.. and based on result take the action.. but i'm not able to compare image icon.. following is the code that i'm trying:
The code assumes that Icon.toString() returns file name; is that a correct assumption? And even if it is, does it look like the string you're comparing it to?
But more fundamentally, what is that comparison good for? Is this an event handler that handles several buttons? If so, why not give each button its own event handler, thus neatly avoiding such problems?