Abstract
The Java software components and the event driven technique support a GUI for games. The GUI is not only showing the output of a game but also plays an input role. This chapter illustrates these features of a GUI by developing a game Anagram from a pure in-text version to a GUI version. The input portion of the GUI equips the game with software components for allowing the player to input data and actions in order to trigger events for updating the state of the game. The output portion of the GUI provides a board for repainting the updated scenes dynamically. Switching a same game from a text version to a GUI version intuitively explores the features of the event-driven technique clearer and deeper.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Xu, Cw. (2018). Event-Driven: Adding a GUI for the Game Anagram In-Text. In: Learning Java with Games. Springer, Cham. https://doi.org/10.1007/978-3-319-72886-5_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-72886-5_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-72885-8
Online ISBN: 978-3-319-72886-5
eBook Packages: Computer ScienceComputer Science (R0)