Libraryless. Click here for Pure Java version (6839L/39K).
1 | static JPanel textFieldAndButton(S defaultText, S buttonText, VF1<S> onEnter) { |
2 | ret textFieldAndButton(jtextfield(defaultText), buttonText, onEnter); |
3 | } |
4 | |
5 | static JPanel textFieldAndButton(JTextField tf, S buttonText, VF1<S> onEnter) { |
6 | ret textFieldAndButton(tf, buttonText, vf1ToIVF1(onEnter)); |
7 | } |
8 | |
9 | static JPanel textFieldAndButton(JTextField tf, S buttonText, IVF1<S> onEnter) { |
10 | Runnable r = r { callF(onEnter, getText(tf)) }; |
11 | ret centerAndEastWithMargin(onEnter(tf, r), jbutton(buttonText, r)); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019371 |
Snippet name: | textFieldAndButton (center & east) |
Eternal ID of this version: | #1019371/4 |
Text MD5: | 839e241a195b28441ee24a8216820567 |
Transpilation MD5: | 2232f06d557f6c677bdeae4566f5d01c |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-11-04 01:53:44 |
Source code size: | 514 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 368 / 443 |
Version history: | 3 change(s) |
Referenced in: | [show references] |