A basic GUI must contain at least three kinds of objects.
The first of these are components
which define an element which interacts with the user directly either by
getting information from the user or displaying some for the user. A few
examples of this would be a text field or a scroll button. A special type of
component is a container which is used to hold other type of components. You
can think of it as the window that is displayed when you run a program. The
next type of object that is needed for the most basic of GUI’s is an event is an object that represents some
occurrence such as pressing a mouse button or entering text. The final object
that is needed for a basic GUI is a listener which is an object that waits for
an event to happen; when it does the listener reacts to it.
When programming a GUI the relationship between these three
objects must be thought of. Even a button must be planned out so that the
programmer knows exactly what will occur when that button is clicked. Behind
each component that is added to the GUI there needs to be at least one event
and one listener in order for that component to be useful. The programmer must
define the event that will signal interaction with the component and also what
the program is to do upon interaction so that the listener can wait for the
interaction to occur. Once the interaction happens the listener then tells the
component that is has been interacted with so that the interaction can cause a
response by the program.
Rader,Cyndi.“Java GUI Basics” Web.6 Feb. 2013
Again, more visuals to complement the text. We readers are generalists, meaning that we're certainly not as savvy as your IT readers. And, thus, add to your great discussions with some visual or audio components so that we can hear a discussion on this topic (for auditory learners) or see a video or graphic that enhances your textual discussion.
ReplyDelete