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

11
LINES

< > BotCompany Repo | #1026284 // dm_passwordFieldAndSubmit [dev.]

JavaX fragment (include)

1  
static JComponent dm_passwordFieldAndSubmit(S field, fS submitMethodName, O... _) {
2  
  final DynModule m = dm_current_mandatory();
3  
  ret dm_passwordFieldAndSubmit(field, rThread { call(m, submitMethodName) }, _);
4  
}
5  
6  
static JComponent dm_passwordFieldAndSubmit(S field, Runnable action, O... _) {
7  
  JPasswordField tf = boolPar centered(_) ? dm_centeredPasswordField(field) : dm_passwordField(field);
8  
  if (boolPar focusOnShow(_)) focusAndSelectAllOnShow(tf);
9  
  ret centerAndEastWithMargin(onEnter(tf, action),
10  
    jbutton(optPar buttonText(_, "Submit"), action));
11  
}

Author comment

Began life as a copy of #1021020

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1026284
Snippet name: dm_passwordFieldAndSubmit [dev.]
Eternal ID of this version: #1026284/1
Text MD5: fdc7a91c9fedff562445fb1e27e82523
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-11 15:01:23
Source code size: 575 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 219 / 253
Referenced in: [show references]