• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java classes

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic