A good answer might be:

Yes, for the figure the mouseOver event is ignored.

No, for the button the mouseOver event changes the mouse pointer from an arrow to a hand. (Some browsers don't do this.)

Three Parts of a GUI Program

A GUI program consists of three types of software:

  1. Graphical Components that make up the Graphical User Interface.
  2. Listener methods that receive the events and respond to them.
  3. Application methods that do useful work for the user.

You get graphical components by constructing Swing objects. Listener methods and application methods are Java methods that you write. You have already written application methods: they are just ordinary Java methods that perform useful computations.

Your web browser has components (such as the "back" and "forward" buttons), listener methods that receive events (such as a click on the "back" button) and application methods that do useful things (such as moving back one page.)

To write a GUI application, keep the three types software separated (while keeping the big picture in mind.) In a big software project an entire team of programmers is assigned to each of the tasks.


Consider a radio and its user interface. Match each part of the radio with its analogous part in a GUI application.

Radio Similar GUI Parts
Control knobs, dial, and levers  
Variable resistors and capacitors, switches  
Receiver electronics and audio amplifier