New To Java - class to class

What is the way to copy the Sting from textfield1 in public class1 to textfield2 in public class2. textfield2.settext(class1.textfield1.getText()); obviously don't work.Slowly please, I am a newbie :-)
[230 byte] By [kiekeboea] at [2007-11-26 23:31:11]
# 1

Put a method in class1 like this:

public String getText()

{

return textfield1.getText();

}

CaptainMorgan08a at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 2
you have to instantiate both classes first.
Clem1986a at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 3
textfield2.settext(class1.textfield1.getText()); obviously don't work.That would only work if textfield1 was a public static variable in class1. You need to instantiate both classes (as already suggested).
CaptainMorgan08a at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 4
hiiiiiiiiiiiiiiiii
abzyxa at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 5

Doin' the Jav. Hey pretty, pretty

When you get that notion, put your for-loop in motion, hey

Doin' the Jav. Hey sexy, sexy Ain't nothing wrong, if you

wanna do the Jav all night long

I don't pretend I know what the OP wants,

I don't care what the OP wants,

He ll I don't even know what I want except whirled peas.

filestreama at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 6

Doin' the Jav. Hey pretty, pretty

When you get that notion, put your for-loop in

motion, hey

Doin' the Jav. Hey sexy, sexy Ain't nothing wrong, if

you

wanna do the Jav all night long

I don't pretend I know what the OP wants,

I don't care what the OP wants,

He ll I don't even know what I want except whirled

peas.

WTF are whirled peas?

CSAngela at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 7
WTF are whirled peas?Say it 10 times fast.
hunter9000a at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 8
WTF are whirled peas?Say it 10 times fast.Gotcha.:-)
CSAngela at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 9

WTF are whirled peas?

Say it 10 times fast.

I think I saw that on a bumper sticker: "Visualize Whirled Peas".

My favorite bumper sticker sighting was when I saw

"My child is an honor roll student" on the bumper of a car.

I didn't think much of it, until I turned the corner and saw

a pickup truck with the bumper sticker "My kid just

beat up your honor roll student"!

DrLaszloJamfa at 2007-7-10 14:42:49 > top of Java-index,Java Essentials,New To Java...
# 10
Whirled peas. I like that.On the subject of immutability, I'm siding with whoever is against embla. I saw embla once use the word "utilize", which was unacceptable! What a shoddy word. Bad embla.
Djaunla at 2007-7-10 14:42:50 > top of Java-index,Java Essentials,New To Java...
# 11

WTF are whirled peas?

Say it 10 times fast.

I think I saw that on a bumper sticker: "Visualize

Whirled Peas".

That exactly where I got it from.

This is just another one of many threads where uj exhibits her less-than-social behaviour.

zadok gave me license to inject a bit of jocularity; I ran with it. ;-)

filestreama at 2007-7-10 14:42:50 > top of Java-index,Java Essentials,New To Java...