Communicating from event handler to container



I have a class, let's call it AC, which extends JPanel. Each instance of AC
also contains a JTextField. The actionlistener for the text field is also in
the class definition of AC. If a certain condition is detected by the
actionlistener, the object needs to tell the parent object that contains AC
to inform all other instances of AC that they need to be updated. How is
this communication back to the parent object usually accomplished in Java?
Thanks!


.



Relevant Pages

  • Re: Communicating from event handler to container
    ... actionlistener, the object needs to tell the parent object that contains AC ... public void buildGUI() ... JTextField tf = new JTextField; ...
    (comp.lang.java.help)
  • Re: help w/ DocumentListeners
    ... > public class TreePanel extends JPanel implements ActionListener, ... > My FormPanel is where my text field is located. ... > private JTextField tName; ...
    (comp.lang.java.gui)
  • Re: Jtextfield.getText() does not work!
    ... > and when i type something in the JTextfield and press send the code from ... in paintComponent you make init all your components. ... you must know that paintComponent may be called many times pro second. ... MyClass extends JPanel implements ActionListener { ...
    (comp.lang.java.gui)
  • Re: How can you move the cursor authomatically among different GUI components in a JFrame
    ... | Try adding an ActionListener to the JTextField. ... Jon said) ... public class KeyboardText extends Frame implements ActionListener ... TextField tf1 = new TextField, ...
    (comp.lang.java.gui)
  • Re: Return pressed event
    ... > public class Frame1 extends JFrame implements ActionListener, KeyListener ... JTextField, and all you need to do is to register an ActionListener on ...
    (comp.lang.java.programmer)