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)

static JComponent dm_passwordFieldAndSubmit(S field, fS submitMethodName, O... _) {
  final DynModule m = dm_current_mandatory();
  ret dm_passwordFieldAndSubmit(field, rThread { call(m, submitMethodName) }, _);
}

static JComponent dm_passwordFieldAndSubmit(S field, Runnable action, O... _) {
  JPasswordField tf = boolPar centered(_) ? dm_centeredPasswordField(field) : dm_passwordField(field);
  if (boolPar focusOnShow(_)) focusAndSelectAllOnShow(tf);
  ret centerAndEastWithMargin(onEnter(tf, action),
    jbutton(optPar buttonText(_, "Submit"), action));
}

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: 139 / 171
Referenced in: [show references]