Results 1 to 2 of 2
  1. #1
    kevinn205 is offline Member
    Join Date
    Nov 2011
    Rep Power

    Default Action Listener listen to another class/ program

    Hey, I created a table that refreshes data and adds data from a seperate adding program; my problem is that I have been unable to get the table to update whenever I add a contact, my best idea has been to create a action listener that listens across the two tables

    is this goal possible? heres the action event and how im trying to get it to work

    public void actionPerformed(ActionEvent e)
    {Object source = e.getSource();
    if (source == exitButton)
    { System.exit(0);}
    else if (source == StoreData2.acceptButton)

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Action Listener listen to another class/ program

    To see what is happening in your code add a println at the start of the method and print out the value of e (the ActionEvent object. Scan what is printed to see if you recognize any of it.

Similar Threads

  1. Java Addition Program Help with Action Listener
    By Syanara in forum New To Java
    Replies: 21
    Last Post: 05-12-2011, 07:03 PM
  2. Replies: 12
    Last Post: 05-04-2011, 09:31 PM
  3. Make a menybutton (action)listen!
    By LennyKosmos in forum New To Java
    Replies: 1
    Last Post: 10-25-2010, 05:12 PM
  4. Action Listener
    By greatmajestics in forum AWT / Swing
    Replies: 8
    Last Post: 03-25-2010, 05:39 PM
  5. Action Listener? how to use this?
    By jeffrey in forum New To Java
    Replies: 2
    Last Post: 10-12-2009, 08:51 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