BRANCH :- CS
ROLL NO :- 374
DATE :- 25/03/2011
Sign:-____________ Grade:-_____________
JAVA-CODE:-
import javax.swing.*;
import java.net.InetAddress;
try {
UIManager.setLookAndFeel(UIManager. getSystemLookAndFeelClassName
() );}
catch ( Exception e ) {}
int time = 0;
while(true) {
break;}
time *=1000;
try
if(reachable)
{ JOptionPane.showMessageDialog( null,str+"Host is
connected","Alert", JOptionPane.ERROR_MESSAGE); }
else
{ JOptionPane.showMessageDialog( null,str+"Host is
not connected","Alert", JOptionPane.ERROR_MESSAGE);
}
} catch (Exception e)
{ e.printStackTrace();
} }}
Output:-