Saturday, March 21, 2020
Thursday, March 5, 2020
Developing a Java GUI
Developing a Java GUI GUI stands for Graphical User Interface, a term used not only in Java but in all programming languages that support the development of GUIs. A programs graphical user interface presents an easy-to-use visual display to the user. It is made up of graphical components (e.g., buttons, labels, windows) through which the user can interact with the page or application. To make graphical user interfaces in Java, use either Swing (older applications) or JavaFX. Typical Elements A GUI includes a range of user interface elementsà - which just means all the elements that display when you are working in an application.à These can include: Input controls such as buttons, dropdown lists, checkboxes, and text fields.Informational elements such as labels, banners, icons, or notification dialogs.Navigational elements, including sidebars, breadcrumbs, and menus. Java GUI Frameworks: Swing and JavaFX Java has included Swing, an API for creating GUIs, in its Java Standard Edition since Java 1.2, or 2007. Its designed with a modular architecture so that elements are easily plug-and-play and can be customized. It has long been the API of choice for Java developers when creating GUIs. JavaFX has also been around a long timeà - Sun Microsystems, which owned Java before the current owner Oracle, released the first version in 2008, but it didnt really gain traction until Oracle purchased Java from Sun. Oracles intention is to eventually replace Swing with JavaFX. Java 8, released in 2014, was the first release to include JavaFX in the core distribution. If you are new to Java, you should learn JavaFX rather than Swing, although you may need to understand Swing because so many applications incorporate it, and so many developers are still actively using it. JavaFX features an entirely different set of graphic components as well as a new terminology and has many features that interface with web programming, such as support for Cascading Style Sheets (CSS), a web component for embedding a web page inside an FX application, and the functionality to play web multimedia content.à Design and Usability If youre an application developer, you need to consider not only theà tools and programming widgets you will use to create your GUI, but also be aware of the user and how he will interact with the application. For example, is the application intuitive and easy to navigate? Can your user find what he needs in the expected places? Be consistent and predictable about where you place thingsà - for instance, users are familiar with navigational elements on top menu bars or left sidebars. Adding navigation in a right sidebar or on the bottom will only make the user experience more difficult. Other issues might include the availability and power of any search mechanism, the behavior of the application when an error occurs, and, of course, the general aesthetics of the application. Usability is a field in and of itself, but once you have mastered the tools for creating GUIs, learn the basics of usability to ensure that your application has a look-and-feel that will make it attractive and useful to its users.
Subscribe to:
Posts (Atom)