Line 29 (Fig. 26.23) creates JList
object colorJList
. The argument to the JList
constructor is the array of Object
s (in this case String
s) to display in the list. Line 30 uses JList
method setVisibleRowCount
to determine the number ...
Get Java How to Program, Early Objects, 11th Edition 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.