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

5
LINES

< > BotCompany Repo | #1035033 // bindJLabelToTransformedVar

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

Libraryless. Click here for Pure Java version (6072L/33K).

static <A extends JLabel, B> A bindJLabelToTransformedVar(IF1<B, O> f, A label, IGetterWithNotify<B> var) {
  bindChangeListenerToComponent(label, var,
    -> { setText(label, strOrNull(f.get(var!))); });
  ret label;
}

Author comment

Began life as a copy of #1034126

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1035033
Snippet name: bindJLabelToTransformedVar
Eternal ID of this version: #1035033/3
Text MD5: 3ffb3da3be9df63b027cad00bd0775c4
Transpilation MD5: c81076cfff07ecb67afab3414d32e564
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 14:06:03
Source code size: 223 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 140 / 199
Version history: 2 change(s)
Referenced in: [show references]