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

10
LINES

< > BotCompany Repo | #1020868 // addToHGrid (untested)

JavaX fragment (include)

1  
svoid addToHGrid(final Container hgrid, final Component c) {
2  
  if (hgrid == null || c == null) ret;
3  
  swing {
4  
    hgrid.add(component);
5  
    GridLayout grid = optCast(GridLayout.class, hgrid.getLayout());
6  
    if (grid != null)
7  
      grid.setColumns(countComponents(hgrid));
8  
    revalidate(hgrid);
9  
  }
10  
}

Author comment

Began life as a copy of #1016811

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020868
Snippet name: addToHGrid (untested)
Eternal ID of this version: #1020868/3
Text MD5: 081f90a56eccd70607f94a1c0f6f9b01
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-06 16:07:53
Source code size: 310 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 287 / 322
Version history: 2 change(s)
Referenced in: [show references]