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

20
LINES

< > BotCompany Repo | #1019977 // inputMultiLineText - show input form for multi-line text. calls action in new thread

JavaX fragment (include)

static void inputMultiLineText(fS msg, fO action) {
  inputMultiLineText(msg, "", action);
}

// action: voidfunc(S)
static void inputMultiLineText(fS msg, final S defaultText, fO action) {
  fO threadInfo = _threadInfo();
  awt {
    final JTextArea ta = wordWrapTypeWriterTextArea(defaultText);
    S title = joinStrings(" | ", msg, programName());
    JComponent form = showFormTitled2(title,
      unnull(msg), ta,
      r {
        vmBus_send('inputtingText_OK, threadInfo, msg, ta);
        callF_thread(action, getText(ta))
      });
    renameSubmitButton(form, "OK");
    vmBus_send('inputtingText, threadInfo, msg, ta);
  }
}

Author comment

Began life as a copy of #1014599

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019977
Snippet name: inputMultiLineText - show input form for multi-line text. calls action in new thread
Eternal ID of this version: #1019977/3
Text MD5: f7f862757a0d89e8fe98ec14c42ff9f6
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-02 21:22:00
Source code size: 654 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 249 / 288
Version history: 2 change(s)
Referenced in: [show references]