Libraryless. Click here for Pure Java version (9213L/51K).
1 | static JComboBox centerComboBoxAndItems(JComboBox cb) swing { |
2 | if (cb != null) { |
3 | var r = cb.getRenderer(); |
4 | cb.setRenderer(new CenteredComboBoxRenderer(r).centerItems(true)); |
5 | centerTextField(textFieldFromComboBox(cb)); |
6 | } |
7 | ret cb; |
8 | } |
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: | 142 / 186 |
Referenced in: | [show references] |