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

!747
!actionListener {
!awt {

m {
  static JList list;
  static int delay = 3000;
  
  p {
    JFrame frame = new JFrame("Bots List");
    frame.setBounds(10, 10, 250, 400);

    list = new JList();
    updateBotList();
    
    frame.getContentPane().add(new JScrollPane(list));
    frame.setVisible(true);
    
    installTimer(list, runnable {
      updateBotList();
    }, delay);
  }
  
  static new MonoThread update;
  
  !include #1001434 // MonoThread
  
  static void updateBotList() {
    update.run(runnable {
      new L<S> bots;
      for (ProgramScan.Program p : quickBotScan()) {
        if (indexOfIgnoreCase(p.helloString, "This is a JavaX VM.") != 0)
          bots.add(p.helloString);
      }
      fillListWithStrings(list, bots);
    });
  }
}

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: 625 / 610
Referenced in: [show references]