Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java classes  RSS feed

 
Donna Bachner
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to use 3 classes how do the communicate. I am getting an input from a text field then want to use the information in another class to process it. what would be the syntax to connect the two classes. my input is called "line" and my process is MyInteger.
thanks
Donna
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of your classes may have a refernce to the other, or pass the value in the constructer.
There are hundrets of possibilities, and I/O and Streams would be one of the last ones.

I assume there is a class, creating the JTextField-containing class (producer) and the consumer:
 
Donna Bachner
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
I want to use a constuctor to change from one class to the other but should i create an object of that class type to get from one to the other. I tried that and it seemed to help me get closer to what I want.
Ps. This question was accidentally put under IO.
Donna
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you be more concrete please (perhaps some code?).
but should i create an object of that class type to get from one to the other.

...constructor to change ... ?
of that class type - which?
From which to where?
I'm allmost lost...

some code please!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!