Communication between classes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: Communication between classes

  1. #1
    Join Date
    May 2006
    Posts
    1

    Communication between classes

    Goodday all.

    For school, I am asked to write a program in Java. The program should arrange for a barrier (up and down moving thingy at the beginning of i.e. a parking lot) to open or close.

    The opening and closing, I can manage. It's just writing bits to a paralel port, using a library I already have.

    The program also has to have a GUI. No probs, also that was easy. Now for the problem: the program should start with a class named Manager. This should initiate the GUI.

    The barrier and the GUI should run in two different threads (problem number one, but I think I can figure that out).

    The biggest problem is: How do I get the manager to see input (i.e. a clicked button) on the GUI and how do I let the manager call the appropriate function on to class ParaController (the controller of the barrier, which has the functions barrierOpen() and barrierClose().

    Could someone show me (pseudo code should do). I've tried making the manager class a parent and the GUI a child, but I still don't get it.

    Regards,

    Frits.
    Last edited by frits.theunis; 05-03-2006 at 04:57 AM.

Similar Threads

  1. Loading classes at runtime
    By Shayne in forum Java
    Replies: 3
    Last Post: 05-12-2007, 09:15 AM
  2. Java - How to define classes
    By SWhockey98 in forum Java
    Replies: 1
    Last Post: 09-29-2005, 04:26 PM
  3. java classes in windows and linux
    By DaveMere in forum Java
    Replies: 2
    Last Post: 08-09-2005, 02:11 PM
  4. COM+ SOAP 2.0 and Abstract Classes
    By Constant in forum VB Classic
    Replies: 0
    Last Post: 07-05-2002, 04:37 PM
  5. Replies: 0
    Last Post: 05-14-2000, 07:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center