Chapter 13. The GUI


Terms you'll need to understand:

  • Human/Computer Interaction (HCI)

  • Model-View-Controller (MVC) pattern

  • JTable

  • Menu

  • TableModel

  • Event model

  • Anonymous class

Techniques you'll need to master:

  • Standardizing the look and feel of a GUI

  • Allowing keyboard shortcuts to select menu items

  • Providing prompting or cueing for user input

  • Identifying and clarifying user message output so that users always know what is going on

  • Designing the GUI so that you know the state of its components and can respond to user input

  • Designing your project's error behavior so that the GUI doesn't hang

  • Reporting errors clearly and simply

  • Clearly indicating user action success and failure

  • Acknowledging user actions immediately

In this chapter, you review the basics of GUI design. Generally, designing a GUI is easy, but you need to be thorough so that you don't leave the evaluator with a bad impression because of a simple oversight.

Your GUI needs to be simple and easy to use ”a goal for all applications, and your project is no different. When designing a GUI, there are many ideas to consider, but Sun has narrowed the scope of possibilities with a few requirements defined in the instructions you downloaded. For example, you must use a JTable component. Because of Sun's requirements in the instructions, the basics of the screen functionality have been decided, including using a JTable to display database data. Although GUI design is harder than it seems, this certification assignment does help you in that a large part of the design is determined by the JTable requirement.

You should start your GUI design with a review of good Human/Computer Interaction (HCI) principles to prevent fundamental mistakes. I recommend visiting Sun's Java Software Human Interface Group (http://developer.java.sun.com/developer/techDocs/hi/index.html). Although this site doesn't provide a lot of information, it takes only a few minutes to peruse it and glean a few clues about what the evaluator expects your GUI to look like, especially users' ability to select items to reserve and a display based on a JTable grid.

Chapters 14, "The Swing Components and Event Handling," and 15, "The JTable Component," demonstrate how to use the various Swing components you'll need to build your GUI. In this chapter, you see an example of a GUI that demonstrates what you need to do to satisfy the certification requirements.



JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net