static S getTextTrim(JTextComponent c) { ret trim(getText(c)); } // tested for editable combo box - returns the contents of text field static S getTextTrim(JComboBox cb) { ret trim(getText(cb)); } static S getTextTrim(JComponent c) { if (c instanceof JLabel) ret trim(((JLabel) c).getText()); if (c instanceof JComboBox) ret getTextTrim((JComboBox) c); ret getTextTrim((JTextComponent) c); }
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: | #1006455 |
Snippet name: | getTextTrim - getText() from JTextComponent, trim |
Eternal ID of this version: | #1006455/6 |
Text MD5: | 3a1de0debcdd9917f749892022361785 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-15 16:49:59 |
Source code size: | 416 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 613 / 664 |
Version history: | 5 change(s) |
Referenced in: | [show references] |