Beginning Java: A NetBeans IDE 8 Programming Tutorial by Philip Conrod & Lou Tylee

Beginning Java: A NetBeans IDE 8 Programming Tutorial by Philip Conrod & Lou Tylee

Author:Philip Conrod & Lou Tylee [Conrod, Philip]
Language: eng
Format: azw3
ISBN: 9781937161002
Publisher: Kidware Software LLC
Published: 2017-04-25T04:00:00+00:00


Graphic User Interfaces (GUI)

All the Java projects built in this course have been console applications. The computer asks some questions, you answer the questions. Because of the simplicity, using console applications is a good way to learn the Java programming language. But, let’s move on. Most programs in use feature what is called a graphic user interface. This is abbreviated GUI and pronounced “gooey.” In Java, you can build GUI applications that run on your desktop or laptop computer or GUI applications that run on the Internet, so-called applets. Console applications are text-based. GUI applications are built with frames using controls, such as menus, toolbars, buttons, text boxes, selection boxes, scroll bars and other devices the user interacts with to operate the program. The primary interaction with these controls is via the computer mouse. If you’ve used a computer, you have used GUI applications. Examples include video games, spreadsheet programs, word processors, Internet browsers, the Windows operating system itself. In each of these applications, you would be helpless without your mouse!

Running (and building) a GUI application is different than a console application. In a console application, everything runs sequentially – you are asked a series of questions, you provide a series of answers. In a GUI application, the computer sits and waits until the user does something – clicks on a menu item, chooses an option, types somewhere, moves a scroll bar, etc. We say the application is waiting for an event to occur. For this reason, GUI applications are called event-driven. When a particular event occurs, the application processes a series of statements (Java statements, in our applications) associated with that event. That series of statements is called an event method. Yes, this the same kind of method we have already been using in Java. In Java, event methods are implemented in code using event listeners – they “listen” for events to occur.

Here’s how it works:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.