program run bt the output result is not what i expect..
running part here; Autoconnect.java
import java.awt.FlowLayout;
import javax.swing.JFrame;
public class Autoconnect extends JFrame{
private CheckConnection tr;
public Autoconnect(){
//setSize(200,200);
tr = new CheckConnection();
Thread t = new Thread(tr);
t.setDaemon(true);
if(tr.online = true){
t.start();
}
if(tr.online = false){
}
else{
synchronized(tr) {
tr.online = true;
tr.notify();
}
}
this.getContentPane().setLayout(new FlowLayout());
this.setVisible(true);
this.setDefaultCloseOperation( EXIT_ON_CLOSE);
}
public static void main(String args[]){
Autoconnect th=new Autoconnect();
}
}