I made software to monitor servers
I have Jframe
with several buttons where these are one color (green if server is online and red otherwise). I run 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 updated 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 repaint
or revalidate
if I needed to use them?