Class BeanyBaby

All Implemented Interfaces:
ActionListener, MouseListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class BeanyBaby extends JFrame implements PropertyChangeListener, ActionListener, MouseListener
Demo of beans. Created on December 30, 2002, 7:54 PM
Author:
Derrick Oswald
See Also:
  • Field Details

    • mTrail

      protected Vector mTrail
      Bread crumb trail of visited URLs.
    • mCrumb

      protected int mCrumb
      Current position on the bread crumb trail.
  • Constructor Details

    • BeanyBaby

      public BeanyBaby()
      Creates new form BeanyBaby
  • Method Details

    • propertyChange

      public void propertyChange(PropertyChangeEvent event)
      This method ties the two beans together on the same connection. Whenever a property changes on one bean, make sure the URL properties agree by setting the URL from one to the other.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      event - The event describing the event source and the property that has changed.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Handles UI events. Changing the URL in the text field, altering a checkbox setting or choosing a menu item winds up here, where the appropriate change is made to the state of the bean.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - Details about the action.
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      Invoked when the mouse button has been clicked on a component. A mouse click is a press and release of a mouse button.
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      event - Details on the mouse event.
    • mouseEntered

      public void mouseEntered(MouseEvent event)
      Invoked when the mouse enters a component.
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      event - Details on the mouse event.
    • mouseExited

      public void mouseExited(MouseEvent event)
      Invoked when the mouse exits a component.
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      event - Details on the mouse event.
    • mousePressed

      public void mousePressed(MouseEvent event)
      Invoked when a mouse button has been pressed on a component.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      event - Details on the mouse event.
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      Invoked when a mouse button has been released on a component.
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      event - Details on the mouse event.
    • setURL

      public void setURL(String url)
      Set the URL for the bean.
      Parameters:
      url - The URL to use in the bean.
    • main

      public static void main(String[] args)
      Unit test.
      Parameters:
      args - [0] The URL to use in the bean (optional).