static <A extends JComponent> A fontSizeTimes(final double factor, final A c) { if (c != null) swing { Font font = c.getFont(); Font font2 = font.deriveFont((float) (font.getSize2D()*factor)); printVars(+font, +font2); c.setFont(font2); } ret c; }
Began life as a copy of #1020383
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: | #1021027 |
Snippet name: | fontSizeTimes - increase JComponent's font size with a factor |
Eternal ID of this version: | #1021027/4 |
Text MD5: | 75d3c77b36e0e1a7a45951843c6b5001 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-06-12 09:52:30 |
Source code size: | 277 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 320 / 357 |
Version history: | 3 change(s) |
Referenced in: | [show references] |