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

13
LINES

< > BotCompany Repo | #1019393 // dm_addTrayIcon

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

Libraryless. Click here for Pure Java version (15097L/92K).

svoid dm_addTrayIcon(final JComponent icon) {
  if (icon == null) ret;
  final DynModule m = dm_current_mandatory();
  swing {
    L<JComponent> l = dm_getOSOpt('trayAreaComponents);
    if (l == null) ret;
    if (l.contains(icon)) ret;
    l.add(icon);
    dm_updateTrayIcons();
    temp dm_enter(m);
    dm_ownTimer dm_removeTrayIcon(icon);
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019393
Snippet name: dm_addTrayIcon
Eternal ID of this version: #1019393/9
Text MD5: 572bc415f68cfa199e89807b65c8a426
Transpilation MD5: fc55e79379bd5eacf805244221325f9a
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-28 17:48:36
Source code size: 361 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 258 / 325
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1019394 - dm_removeTrayIcon
#1019404 - dm_addTrayIcon_left - add to the left of the pack