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

11
LINES

< > BotCompany Repo | #1036497 // tempAddComponentInFront - temporarily add component to container

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

Libraryless. Click here for Pure Java version (9944L/55K).

static AutoCloseable tempAddComponentInFront(Container a, Component b) {
  if (a == null || b == null) null;
  swing {
    if (b.getParent() == a) null;
    addComponentInFront(a, b);
    ret -> swing {
      if (b.getParent() == a)
        removeFromParent(b);
    };
  }
}

Author comment

Began life as a copy of #1017722

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1036497
Snippet name: tempAddComponentInFront - temporarily add component to container
Eternal ID of this version: #1036497/1
Text MD5: 58c5fb8635243989d2fc181a6367c754
Transpilation MD5: 05a9e2ba64e665f44be7ef1e9479357a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-12-30 15:42:35
Source code size: 284 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 151 / 200
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)