1
I made software to monitor servers
I have a Jframe with several buttons in which these set a color (green if server is online and red otherwise). I do this test using ping.
When I click the button to open this frame, all buttons are painted once, I would like to do this to stay updating in real time
My code starts like this:
 private void BtTecnicoActionPerformed(java.awt.event.ActionEvent evt){                                          
    JFramePrincipal d = new JFramePrincipal();
    d.setVisible(true);
    PingThread servidor = new PingThread ("ip",d.BTbotao);
    servidor.start();
}
Where would I use the repaint or revalidate if necessary to use them?