Thread: GUI issues
View Single Post
Old Jan 15th, 2007, 10:59 PM   #2
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 4 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Well, it does show you the data you want, but not a the pace you would like it to run.

I changed a couple of things around and managed to get some results. In your ConnectionHandler class's actionPerformed() method, the while loop goes really slow. This try statement takes a while to process.
try
   {
	InetAddress address = InetAddress.getByName(octet1 + "." + octet2 + "." + octet3+ "." + i);
	display.setText(display.getText() + "\n" + "Address : " + address.getHostAddress() + "\tName: " + address.getHostName() + "\tReachable : " + address.isReachable(500) + "\n");
	i++;
   }


I recommend you have another thread process this data and have some sort of dialog box show while the data is process and have the frame in the background so the user doesn't interrupt anything or user the thinks the program froze.
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote