your first question: if you want to display html and hyperlinks, use JEditorPane. The API provides examples for loading html pages. your second question: requestFocus() works only if the component that requests focus is visible. use the ancestor listener to listen when its added to its ancestor. by this time it should be visible. chantal
hai, Seems like you have a very nice problem. But are u using JEditor pane through out, for all your html pages in that case u get the anchor in that by itself. Maybe u are mixing panes and HTML
i ma using editor pane, but my problem is, thr r two separate panels .. in the left panel i am giving the links and on clicking the link, correspondong section in the right panel needs to be shown.. can to help?
This does not seem to be a problem of the Editor pane. But your desing seems to be having some problem. you seem to want to navigate a set of panels using a HTML page on a JEditor pane. Maybe u must change it a little bit and try loading the panels dynamically or use some gridlayout and put the required panel on the first grid in response to a click. hope that helps
but in such a case, i have to reload the whole thing each time, no? is thr any alternative like setting the focus to that panel on each click? we r dynamically generating the panels.