Show Table of Contents
Chapter 24. Pet Store Example
24.1. Pet Store Example
All of the Java code for the Pet Store Example is contained in the file
PetStore.java. It defines the following principal classes (in addition to several classes to handle Swing Events):
Petstorecontains themain()method.PetStoreUIis responsible for creating and displaying the Swing based GUI. It contains several smaller classes, mainly for responding to various GUI events such as mouse button clicks.TableModelholds the table data. It is a JavaBean that extends the Swing classAbstractTableModel.CheckoutCallbackallows the GUI to interact with the Rules.Ordershowkeeps the items that the customer wishes to buy.Purchasestores details of the order and the products the customer is buying.Productis a JavaBean holding details of the product available for purchase and its price.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.