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).

1  
svoid dm_addTrayIcon(final JComponent icon) {
2  
  if (icon == null) ret;
3  
  final DynModule m = dm_current_mandatory();
4  
  swing {
5  
    L<JComponent> l = dm_getOSOpt('trayAreaComponents);
6  
    if (l == null) ret;
7  
    if (l.contains(icon)) ret;
8  
    l.add(icon);
9  
    dm_updateTrayIcons();
10  
    temp dm_enter(m);
11  
    dm_ownTimer dm_removeTrayIcon(icon);
12  
  }
13  
}

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: 264 / 332
Version history: 8 change(s)
Referenced in: [show references]