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

10
LINES

< > BotCompany Repo | #1013366 // centerComboBox

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

Transpiled version (9208L) is out of date.

static JComboBox centerComboBox(JComboBox cb) swing {
  if (cb != null)
    if (!cb.isEditable()) {
      var r = cb.getRenderer();
      if (!r instanceof CenteredComboBoxRenderer)
        cb.setRenderer(new CenteredComboBoxRenderer(r));
    } else
      centerTextField(textFieldFromComboBox(cb));
  ret cb;
}

Author comment

Began life as a copy of #1007806

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: #1013366
Snippet name: centerComboBox
Eternal ID of this version: #1013366/6
Text MD5: 13e80565426964eb9d734d5b2911b3b5
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:36:56
Source code size: 320 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 447 / 560
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1035911 - centerComboBoxAndItems