Create a GUI-based program to help me manage my glass collection for my business
ID: 3572412 • Letter: C
Question
Create a GUI-based program to help me manage my glass collection for my business. The program will create an object for each type of glass, allow the user to enter/view data on each type of glass through a GUI, and save the objects in a list (implement as array or ArrayList, your choice).
Glass Class Definition
The Glass class must contain the following fields:
Code — String value, used as the primary key, with two letters corresponding to the manufacturer followed by up to four digits indicating the color
Manufacturer — String value
Color code as an RGB value (integer or Color object)
Color name — String value
Quantity in ounces — integer value
Type of glass — rod, frit, or tubing, suggest integer value or enum
Characteristics — array of boolean values for WYSIWIG, reactive, striking, chrome
Notes — string
Each field will need an accessor method and a modifier method. You may choose to implement one or more constructors, but no other methods will be necessary.
GUI Specifications
Each field of the glass class will have a widget for data entry in the GUI, as follows:
Code: one or more text fields, code letters should be automatically assigned based on Manufacturer selection
Manufacturer: combo box with optional drop-down, values are Northstar (code NS), Glass Alchemy (code GA), Trautmann (code TAG), and Momka (code MK)
Color code: color chooser
Color name: text field
Quantity: two text fields, one for pounds and one for ounces (display quantity as lbs./oz. but store as oz. only)
Type of glass: radio buttons for rod, frit, tubing, with rod as the default selection
Characteristics: check boxes, with all unselected as the default
Notes: text area
Navigation buttons: buttons for First (displays first entry), Next (goes to next entry), Last (goes to last entry in current list), Exit (exits program). If First or Next land on an element that doesn’t yet exist, display an empty GUI for the user to fill in.
Each widget should have an associated Action Listener object of the appropriate Listener type (see the API for what to use for each). Each Listener should update the corresponding value(s) when the attached widget is modified; in other words, the objects are updated on-the-fly rather than via an Update button.
Add action listeners
Explanation / Answer
Hii there this code on GlassPane may help you out .
Code: