Libraryless. Click here for Pure Java version (6072L/33K).
static <A extends JLabel> A bindJLabelToVar(A label, IGetterWithNotify var) { bindListenerToComponent(label, var, -> { try { setText(label, strOrNull(var!)); } catch print e { setText(label, "Error"); } }); ret label; }
Began life as a copy of #1016975
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1034437 |
| Snippet name: | bindJLabelToVar |
| Eternal ID of this version: | #1034437/4 |
| Text MD5: | de9a0da9ab4310a69a162850e8dcff95 |
| Transpilation MD5: | 07b2a55a6e17e320dcd9a6bd4a2ca62f |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-24 15:10:03 |
| Source code size: | 258 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 367 / 492 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |