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

20
LINES

< > BotCompany Repo | #1000920 // JLabel with HTML content

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

Libraryless. Click here for Pure Java version (40L/1K/2K).

1  
!747
2  
!multi-line strings
3  
4  
m {
5  
  static S html = [[
6  
    <html><b>Bold</b> and <i>italic</i>.</html>
7  
  ]];
8  
  
9  
  p {
10  
    makeFrame(new JLabel(html.trim())); // trim is important!
11  
  }
12  
  
13  
  static void makeFrame(Component content) {
14  
    JFrame frame = new JFrame("JavaX");
15  
    frame.getContentPane().add(content);
16  
    frame.setBounds(300, 100, 500, 400);
17  
    frame.setVisible(true);
18  
    exitOnFrameClose(frame);
19  
  }
20  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1000920
Snippet name: JLabel with HTML content
Eternal ID of this version: #1000920/1
Text MD5: 280c090bcebd41148efc83c46cfbdccb
Transpilation MD5: b4bc9eb822996be0c6f2f50bf4d36b64
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-09-09 17:03:50
Source code size: 431 bytes / 20 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 659 / 677
Referenced in: [show references]