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

15
LINES

< > BotCompany Repo | #1008593 // Scrollable Swing panel without a layout manager [WORKS]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Uses 3874K of libraries. Click here for Pure Java version (2297L/16K/61K).

!7

p-substance {
  JPanel panel = panelWithoutLayoutManager();
  int y = 10;
  for i to 10: {
    JTextField tf = jtextfield();
    panel.add(tf);
    int h = tf.getPreferredSize().height;
    tf.setBounds(10, y, 300, h);
    y += h + 10;
  }
  adjustPanelSizeToComponents(panel, 10);
  showFrame(jscroll_centered(panel));
}

Author comment

Began life as a copy of #1008591

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008593
Snippet name: Scrollable Swing panel without a layout manager [WORKS]
Eternal ID of this version: #1008593/8
Text MD5: b4993c252d2c6ea1a2190d688c71cf7d
Transpilation MD5: 273d570c6b32a6e80057da346bfa12a2
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-25 14:27:41
Source code size: 339 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 416 / 498
Version history: 7 change(s)
Referenced in: #1008596 - Custom layout manager, scrollable [WORKS]