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

38
LINES

< > BotCompany Repo | #1001430 // Swing: Bots List

JavaX source code [tags: archive use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (392L/4K/15K).

1  
!747
2  
!actionListener {
3  
!awt {
4  
5  
m {
6  
  static JList list;
7  
  static int delay = 3000;
8  
  
9  
  p {
10  
    JFrame frame = new JFrame("Bots List");
11  
    frame.setBounds(10, 10, 250, 400);
12  
13  
    list = new JList();
14  
    updateBotList();
15  
    
16  
    frame.getContentPane().add(new JScrollPane(list));
17  
    frame.setVisible(true);
18  
    
19  
    installTimer(list, runnable {
20  
      updateBotList();
21  
    }, delay);
22  
  }
23  
  
24  
  static new MonoThread update;
25  
  
26  
  !include #1001434 // MonoThread
27  
  
28  
  static void updateBotList() {
29  
    update.run(runnable {
30  
      new L<S> bots;
31  
      for (ProgramScan.Program p : quickBotScan()) {
32  
        if (indexOfIgnoreCase(p.helloString, "This is a JavaX VM.") != 0)
33  
          bots.add(p.helloString);
34  
      }
35  
      fillListWithStrings(list, bots);
36  
    });
37  
  }
38  
}

Author comment

Began life as a copy of #1000763

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): cfunsshuasjs, ddnzoavkxhuk, dhtvkmknsjym, mqqgnosmbjvj, onxytkatvevr, sawdedvomwva, teubizvjbppd, tvejysmllsmz

No comments. add comment

Snippet ID: #1001430
Snippet name: Swing: Bots List
Eternal ID of this version: #1001430/1
Text MD5: b0f8d56eb384317971fe4ec2fdbaa943
Transpilation MD5: d42a686705e63bc33d32849a4b0edf17
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): Yes
Created/modified: 2015-10-15 20:42:29
Source code size: 803 bytes / 38 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 721 / 721
Referenced in: [show references]