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

24
LINES

< > BotCompany Repo | #1006228 // jSection - make lowered BevelBorder around component

JavaX fragment (include)

import javax.swing.border.*;

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

static JPanel jSection(fS title, final Component c) {
  ret swing(func -> JPanel {
    Border border = BorderFactory.createBevelBorder(BevelBorder.LOWERED);
    border = BorderFactory.createTitledBorder(border, title);
    JSection panel = new(c);
    panel.setBorder(border);
    ret panel;
  });
}

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


static JPanel jSection(LiveValue<?> lv, Component c) {
  ret jLiveValueSection(lv, c);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006228
Snippet name: jSection - make lowered BevelBorder around component
Eternal ID of this version: #1006228/9
Text MD5: 03237544fc3133dccee3d4bb8baf5c00
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-14 09:11:17
Source code size: 577 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 734 / 785
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1014638 - jRaisedSection - make raised BevelBorder around component
#1014705 - jsection - synonym of jSection - make lowered BevelBorder around component
#1015895 - jLiveValueSection - jSection + LiveValue
#1016951 - jCenteredSection - jSection with centered title