Gluttony Game (Java GUI)
GUI Overview
GUI Overview
In the early days, computers offered users a monotonous, boring, character-only state of the “Command Line Interface (CLI)”. It is to this day that we can still vaguely see them: open a DOS window in Windows and you can see the footprint of history. Later, Apple took the lead in the computer’s operating system to achieve a graphical user interface (Graphical User Interface, or GUI), but due to Apple’s closed market strategy to complete their own computer hardware, operating system, application software a one-stop product, and other PC incompatible. This makes Apple miss a good opportunity to unify the global PC.
Later, Microsoft launched the popular Windows operating system, which established the status of the operating system standard with its excellent graphical user interface. This also created the world’s richest man — Bill. Gates and the titan of the IT industry, Microsoft Corporation.
In today’s world of graphical user interfaces, an application is not acceptable to users without a good GUI. And the Java language understands the importance of this, and it provides a set of tools that make it easy to build GUIs. In this and the next chapter, we will demonstrate this to you in full.
A Graphical User Interface (GUI, also known as a graphical user interface) is a user interface for computer operations that uses a graphical display.
GUI is an interface display format for human-computer communication that allows users to manipulate on-screen icons or menu options using input devices such as a mouse to select commands, invoke files, start programs, or perform some other everyday task. The GUI has many advantages over a character interface where routine tasks are performed by entering text or character commands from the keyboard. The GUI consists of windows, drop-down menus, dialog boxes, and their corresponding control mechanisms that are standardized across a variety of newer applications, i.e., the same operations are always performed in the same way. In the GUI, the user sees and manipulates graphical objects and applies the techniques of computer graphics.
Packages for GUI development in Java
java.awt package - mainly provides font/layout manager
javax.swing package [common for commercial development] - mainly provides various components (windows/buttons/textboxes)
java.awt.event package - event handling, implementation of backend functions.
Game screenshots
Code display
The main launch class of the game
|
|
The game’s panel
|
|
Games for the data center
|
|
Code Download
Source code download link: Gluttony Game