help!!!

i hope i posted in the right section.. but if not kindly spare me the flaming... i'm fairly new here.. well ok.. my problem is..

i'm trying to simulate a torrent client and to do that i need to randomize and generate IP addresses...

so i try something like this:

for(i=1;1<10,i++){

area.append((int)(Math.random()),blah blah blah);

}

but it gives me an error saying that JTextArea cannot be applied to (int)

so is there any way i can randomize the numbers and append them in the Text Area?

thanks a lot ^^

[567 byte] By [canephalanxa] at [2007-11-26 15:20:24]
# 1
append them as strings and not ints, maybe.
masijade.a at 2007-7-8 11:48:08 > top of Java-index,Desktop,Core GUI APIs...
# 2
Use "String.valueOf(...)" to convert them.
itchyscratchya at 2007-7-8 11:48:08 > top of Java-index,Desktop,Core GUI APIs...
# 3
thanks! problem solved!just need to do something like thisarea.append(k.toString());thanks ^^
canephalanxa at 2007-7-8 11:48:08 > top of Java-index,Desktop,Core GUI APIs...
# 4
As a general point I would advocate String.valueOf(foo) in place of foo.toString() since it works with null values.
itchyscratchya at 2007-7-8 11:48:08 > top of Java-index,Desktop,Core GUI APIs...