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).

1  
svoid setTitledBorderFontSize(JComponent c, float fontSize) {
2  
  if (c == null) ret;
3  
  swing {
4  
    javax.swing.border.TitledBorder b = optCast(javax.swing.border.TitledBorder.class, c.getBorder());
5  
    if (b != null) {
6  
      Font font = b.getTitleFont();
7  
      b.setTitleFont(font.deriveFont(fontSize));
8  
    }
9  
  }
10  
}

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: 106 / 177
Version history: 4 change(s)
Referenced in: [show references]