Libraryless. Click here for Pure Java version (2373L/16K/56K).
1 | !752 |
2 | |
3 | static JTable tbl; |
4 | static int delay = 3000; |
5 | static boolean withVMs = true; |
6 | |
7 | p { |
8 | tbl = showTable("Local VMs"); |
9 | getFrame(tbl).setBounds(10, 10, 400, 400); |
10 | |
11 | updateList(); |
12 | installTimer(tbl, runnable { updateList(); }, delay); |
13 | } |
14 | |
15 | static new MonoThread update; |
16 | !include #1001434 // MonoThread |
17 | |
18 | static void updateList() { |
19 | update.run(runnable { |
20 | new L<Map> l; |
21 | for (ProgramScan.Program p : quickBotScan()) { |
22 | if (startsWithIgnoreCase(p.helloString, "This is a JavaX VM.")) { |
23 | S botName = firstPartOfHelloString(p.helloString); |
24 | S vmID = sendToLocalBot(p.port, "get vm id"); |
25 | l.add(litmap("VM Name", botName, "Port", p.port, "VM ID", vmID)); |
26 | } |
27 | } |
28 | // sortByField(l, "bla"); |
29 | dataToTable(tbl, l); |
30 | setFrameTitle(tbl, n(l(l), "local VM")); |
31 | }); |
32 | } |
Began life as a copy of #1001680
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001732 |
Snippet name: | Swing: List VMs (v2, with table, developing) |
Eternal ID of this version: | #1001732/1 |
Text MD5: | 139904150090da5e8dc8f4e115fe6e6a |
Transpilation MD5: | 9d0e17d04464604a2c1dcf2e272212af |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-06-15 00:57:58 |
Source code size: | 837 bytes / 32 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 637 / 1427 |
Referenced in: | [show references] |