Download Jar. Libraryless. Click here for Pure Java version (3070L/22K).
!7 p-awt { new L<JButton> buttons; addAndReturn(buttons, makeButton("Default")); addAndReturn(buttons, makeButton("HCenter")).setHorizontalTextPosition(SwingConstants.CENTER); addAndReturn(buttons, makeButton("VBottom")).setVerticalTextPosition(SwingConstants.BOTTOM); JButton btn = addAndReturn(buttons, makeButton("HCenter/VBottom")); btn.setVerticalTextPosition(SwingConstants.BOTTOM); btn.setHorizontalTextPosition(SwingConstants.CENTER); btn = addAndReturn(buttons, makeButton("HCenter/VBottom, gap 20")); btn.setVerticalTextPosition(SwingConstants.BOTTOM); btn.setHorizontalTextPosition(SwingConstants.CENTER); btn.setIconTextGap(20); showFrame(jscroll(jfullcenter(hstackWithSpacing(buttons)))); } static JButton makeButton(S text) { ret jImageAndTextButton_defaultPlacement(#1010239, text, r { infoBox("Hello!") }); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010280 |
Snippet name: | Test JButton with text and image [OK] |
Eternal ID of this version: | #1010280/10 |
Text MD5: | 976ee4bfcdd88506c238bb73a344e6d1 |
Transpilation MD5: | b1b13cd99f9ada1aadf034f01c1fa1e1 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-10 17:05:31 |
Source code size: | 883 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 685 / 1467 |
Version history: | 9 change(s) |
Referenced in: | -