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

8
LINES

< > BotCompany Repo | #1035911 // centerComboBoxAndItems

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9213L/51K).

static JComboBox centerComboBoxAndItems(JComboBox cb) swing {
  if (cb != null) {
    var r = cb.getRenderer();
    cb.setRenderer(new CenteredComboBoxRenderer(r).centerItems(true));
    centerTextField(textFieldFromComboBox(cb));
  }
  ret cb;
}

Author comment

Began life as a copy of #1013366

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035911
Snippet name: centerComboBoxAndItems
Eternal ID of this version: #1035911/1
Text MD5: 94b878c1882bdb25eb508996ac12272c
Transpilation MD5: 45d9bd3efbf17da6683d419b9a0fcbbb
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-12 02:49:56
Source code size: 253 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 140 / 183
Referenced in: [show references]