Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1004827 // Try showing text with hyperlinks [WORKS]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 3874K of libraries. Click here for Pure Java version (5085L/35K/131K).

!7

p-substance {
  S html = hhtml(href("abc", "ABC") + "<br>" + href("def", "DEF"));
  JEditorPane editorPane = new JEditorPane("text/html", html);
  editorPane.setEditable(false);
  showFrame(new JScrollPane(editorPane));
  editorPane.addHyperlinkListener(new HyperlinkListener {
    public void hyperlinkUpdate(HyperlinkEvent e) {
      print("Event! " + e.getEventType() + " " + e.getDescription() + " " + e.getURL());
    }
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004827
Snippet name: Try showing text with hyperlinks [WORKS]
Eternal ID of this version: #1004827/2
Text MD5: 16b1e27f292e6295e5d48fc3ad0fdfb0
Transpilation MD5: ae5a3875b8b5823b49b269f2ca294f7a
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-05 12:22:42
Source code size: 448 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 548 / 646
Version history: 1 change(s)
Referenced in: [show references]