Chapter 8. GUI Building
The first contact that most users have with computers is through GUIs, and the primary means of accessing the most advanced applications by the most sophisticated users is also through GUIs. So it’s natural that building GUIs is one of the first concerns of most new programmers and of many experienced programmers learning a new language like Java or a new tool like NetBeans.
Support for creating GUI applications and components has been essential in NetBeans since its beginning, and it is among its most mature features. But GUI development in NetBeans continues to evolve in response to user requests and technological advances. For example, the serialized objects used in early versions of NetBeans for persistent storage of GUI design details have long since been replaced by XML files. NetBeans is an excellent choice for creating GUIs because its GUI development tools are mature and stable, its GUI development features are easily adaptable to individual preferences, and it has a history of quickly adapting to the needs of the user community.
Creating a GUI Frame or Panel
On the surface GUI building is quite straightforward. Start by creating a container from a template, drag and drop some visual components into it, and then adjust properties for the components as needed. Dig deeper, and you may find some pitfalls. For example, NetBeans translates visually designed forms into automatically generated read-only code, called guarded code . What if the read-only ...
Get NetBeans: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.