I.3 Building a ColorChooser
We now present a ColorChooser
application to demonstrate the GroupLayout
layout manager. The application consists of three JSlider
objects, each representing the values from 0
to 255
for specifying the red, green and blue values of a color. The selected values for each JSlider
will be used to display a filled rectangle of the specified color. We build the application using NetBeans. For an more detailed introduction to developing GUI applications in the NetBeans IDE, see www.netbeans.org/kb/trails/matisse.html.
Creating a New Project
Begin by opening a new NetBeans project. Select File > New Project…. In the New Project dialog, choose Java from the Categories list and Java Application from the Projects list then ...
Get Java How to Program (early objects), 9/e 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.