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)

1  
import javax.swing.border.TitledBorder;
2  
3  
static JPanel jCenteredSection(Component c) {
4  
  ret jCenteredSection("", c);
5  
}
6  
7  
static JPanel jCenteredSection(fS title, final Component c) {
8  
  ret swing(func -> JPanel {
9  
    JPanel p = jSection(title, c);
10  
    ((TitledBorder) p.getBorder()).setTitleJustification(TitledBorder.CENTER);
11  
    ret p;
12  
  });
13  
}
14  
15  
static JPanel jCenteredSection(S title) {
16  
  ret jCenteredSection(title, jpanel());
17  
}

Author comment

Began life as a copy of #1006228

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, 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: 209 / 219
Version history: 2 change(s)
Referenced in: [show references]

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