Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void hyperlinkUpdate(HyperlinkEvent e) {
- if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
- if (e.getSource() instanceof HTMLPanel) {
- HTMLPanel htmlPanel = ((HTMLPanel) e.getSource());
- htmlPanel.requestFocusInWindow();
- htmlPanel.setSelectionStart(e.getSourceElement().getStartOffset());
- htmlPanel.setSelectionEnd(e.getSourceElement().getEndOffset());
- htmlPanel.setSelectedTextColor(Color.black);
- htmlPanel.setSelectionColor(Color.white);
- loadUrl(e.getUrl);
- }
- }
Add Comment
Please, Sign In to add comment