ping203

Greenhorn
+ Follow
since Jan 10, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ping203

Using the setText(String) method of JTextField and the element in the vector needs to override the toString() to return a String (maybe their name or their title)

if your textfield is also an array, then
22 years ago
From the API,
NoRouteToHostException - Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because of an intervening firewall, or if an intermediate router is down.
So, I guess when you call openConnection, it fails to reach the url you specified.
you can try to connect to that url by other means, like a browser, to see if you can connect to it or not.
Ping
Hi,
The error message tells you what is wrong.
Exception in thread "main" java.net.UnknownHostException: www.rediff.com.
Your network does not know what "www.rediff.com" is(Unknown host). It is like you type some address and your browser returns you a Page Not Found message.
btw, your code works fine on my machine and I got the output:
www.rediff.com/64.41.191.70
Ping
try this
((DefaultMutableTreeNode)e.nextElement()).getUserObject()
since the return type of e.nextElement() is Object and you know it is a DefaultMutableTreeNode. Using the getUserObject() will return you a Effect-type object
22 years ago
Hi,
You do only have one Class4 object but its value is kept changing while you do this
Global.class4 = new Class4(class1int2);
By calling "new Class4(...)", you assign a new value to Global.class4.
If you just need ONE Global.class4, do this
then
Class4.addValue(class1int1); //class method
Class4.addValue(class1int2);
Class4.addValue(class1int3);
Class4.printSum();
and forget about the new Class4(...)
then add this method
static void addValue(int value)
{
sumOfValue += value;
}
and change the printSum method to static,
static void printSum()
This way the Class4 only has CLASS method, no instance method.
Ping
[ January 10, 2002: Message edited by: ping203 ]
22 years ago