Q&A

Q1:Why are some of the text fields in the LottoMadness application shaded in gray while others are white?
A1: The setEditable() method has been used on the gray fields to make them impossible to edit. The default behavior of a text field is to enable users to change the value of the text field by clicking within its borders and typing any desired changes. However, some fields are intended to display information rather than take input from the user. The setEditable() method prevents users from changing a field they should not modify.
Q2:Why do some cities have time that varies by a half-hour from time zones, such as Rangoon, Kabul, and Tehran?
A2: Half- and quarter-hour differences are usually because of local authorities that didn't fully ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH 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.