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

9
LINES

< > BotCompany Repo | #1021027 // fontSizeTimes - increase JComponent's font size with a factor

JavaX fragment (include)

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;
}

Author comment

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: 321 / 359
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)