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

10
LINES

< > BotCompany Repo | #1033901 // buttonActionWithPreAndPost

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

Libraryless. Click here for Pure Java version (5095L/28K).

static Runnable buttonActionWithPreAndPost(Runnable r, IVF1<JButton> pre, IVF1<JButton> post) {
  ret -> {
    JButton button = heldInstance(JButton);
    pre?.get(button);
    thread {
      pcallF(r);
      post?.get(button);
    }
  };
}

Author comment

Began life as a copy of #1015872

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033901
Snippet name: buttonActionWithPreAndPost
Eternal ID of this version: #1033901/3
Text MD5: 0efabc9789f4e180184ec3705dd8ba4c
Transpilation MD5: 5b9ec49299f0ef8e9c931ae342a09dd0
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-09 19:31:41
Source code size: 249 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 56 / 88
Version history: 2 change(s)
Referenced in: [show references]