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

15
LINES

< > BotCompany Repo | #1020286 // jCenteredSectionWithFont - jSection with centered title

JavaX fragment (include)

static JPanel jCenteredSectionWithFont(Font font, Component c) {
  ret jCenteredSectionWithFont(font, "", c);
}

static JPanel jCenteredSectionWithFont(final Font font, fS title, final Component c) {
  ret swing(func -> JPanel {
    JPanel p = jCenteredSection(title, c);
    ((TitledBorder) p.getBorder()).setTitleFont(font);
    ret p;
  });
}

static JPanel jCenteredSectionWithFont(Font font, S title) {
  ret jCenteredSectionWithFont(font, title, jpanel());
}

Author comment

Began life as a copy of #1016951

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: #1020286
Snippet name: jCenteredSectionWithFont - jSection with centered title
Eternal ID of this version: #1020286/1
Text MD5: 9fe79c298ab7d642dc8908f6b363150c
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-12 20:46:22
Source code size: 480 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 302 / 340
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1030186 - jSectionWithFont - jSection with title
#1030519 - jCenteredSection_fontSizePlus - jSection with centered title