Este conteúdo não está disponível no idioma selecionado.

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):
  • Petstore contains the main() method.
  • PetStoreUI is 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.
  • TableModel holds the table data. It is a JavaBean that extends the Swing class AbstractTableModel.
  • CheckoutCallback allows the GUI to interact with the Rules.
  • Ordershow keeps the items that the customer wishes to buy.
  • Purchase stores details of the order and the products the customer is buying.
  • Product is a JavaBean holding details of the product available for purchase and its price.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat