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

10
LINES

< > BotCompany Repo | #1030782 // setTitledBorderFontSize

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2918L/17K).

svoid setTitledBorderFontSize(JComponent c, float fontSize) {
  if (c == null) ret;
  swing {
    javax.swing.border.TitledBorder b = optCast(javax.swing.border.TitledBorder.class, c.getBorder());
    if (b != null) {
      Font font = b.getTitleFont();
      b.setTitleFont(font.deriveFont(fontSize));
    }
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030782
Snippet name: setTitledBorderFontSize
Eternal ID of this version: #1030782/5
Text MD5: 8c11af8c0ddfbe7e880ef91145b32813
Transpilation MD5: 7e79c800cb5afd03c9ba7e3a79f17711
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-25 17:52:29
Source code size: 323 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 161 / 254
Version history: 4 change(s)
Referenced in: [show references]