Code example for HTMLDocument

Methods: processHTMLFrameHyperlinkEvent

0
				JEditorPane pane = (JEditorPane) e.getSource();
				if (e instanceof HTMLFrameHyperlinkEvent) {
					System.out.println("Processing HTMLFrameHyperLink");
					HTMLFrameHyperlinkEvent  evt = (HTMLFrameHyperlinkEvent)e;
					HTMLDocument doc = (HTMLDocument)pane.getDocument();
					doc.processHTMLFrameHyperlinkEvent(evt);
				} else { 
					final URL url = e.getURL();
					if (url == null) {
						System.err.println("Error: URL == null");
						return; 
					} 
					if (url.getProtocol().equals("file") && url.getFile().startsWith("/bean:")) {
						System.out.println("Processing bean url: " + url);
						return; 
					} 
					try { 
						System.out.println("Processing regular URL");
						pane.setPage(url);
					} catch (Exception t) {
Experience pair programming with AI  Get Codota for Java