1 | sclass JButtonWithInset extends JButton { |
2 | *() {} |
3 | *(S text) { super(text); } |
4 | *(Action action) { super(action); } |
5 | |
6 | int inset = 10; |
7 | |
8 | public Dimension getMinimumSize() { |
9 | Dimension d = super.getMinimumSize(); |
10 | ret new Dimension(d.width+inset, d.height+inset); |
11 | } |
12 | |
13 | public Dimension getPreferredSize() { |
14 | Dimension d = super.getPreferredSize(); |
15 | ret new Dimension(d.width+inset, d.height+inset); |
16 | } |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020317 |
Snippet name: | JButtonWithInset |
Eternal ID of this version: | #1020317/2 |
Text MD5: | 2077ce5e00a990a2f22e1898af42e52e |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-26 01:28:52 |
Source code size: | 440 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 285 / 808 |
Version history: | 1 change(s) |
Referenced in: | [show references] |