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

17
LINES

< > BotCompany Repo | #1016951 - jCenteredSection - jSection with centered title

JavaX fragment (include)

import javax.swing.border.TitledBorder;

static JPanel jCenteredSection(Component c) {
  ret jCenteredSection("", c);
}

static JPanel jCenteredSection(fS title, final Component c) {
  ret swing(func -> JPanel {
    JPanel p = jSection(title, c);
    ((TitledBorder) p.getBorder()).setTitleJustification(TitledBorder.CENTER);
    ret p;
  });
}

static JPanel jCenteredSection(S title) {
  ret jCenteredSection(title, jpanel());
}

Author comment

Began life as a copy of #1006228

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1016951
Snippet name: jCenteredSection - jSection with centered title
Eternal ID of this version: #1016951/3
Text MD5: acc90ef6332ac60113f824e88a17dec1
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-24 01:08:27
Source code size: 448 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 211 / 221
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1016951 & http://1016951.tinybrain.de