sclass JButtonWithInset extends JButton { *() {} *(S text) { super(text); } *(Action action) { super(action); } int inset = 10; public Dimension getMinimumSize() { Dimension d = super.getMinimumSize(); ret new Dimension(d.width+inset, d.height+inset); } public Dimension getPreferredSize() { Dimension d = super.getPreferredSize(); ret new Dimension(d.width+inset, d.height+inset); } }
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: | 284 / 807 |
Version history: | 1 change(s) |
Referenced in: | [show references] |