March 2002
Intermediate to advanced
496 pages
8h 51m
English
| SOLUTION 18.1 | Figure B.23 shows a solution. Note that this class is concrete. You will soon establish instances of this class as complete user interface factories.
Figure B.23. A UIKit object is a wellspring of GUI components that have a consistent look.
|
| SOLUTION 18.2 | Here is an example solution:
public static UIKit handheld()
{
UIKit k = new UIKit();
Font f = new Font("Dialog", Font.PLAIN, 8);
k.button.setFont(f);
k.textArea.setFont(f);
Cursor c = new Cursor(Cursor.HAND_CURSOR);
k.textArea.setCursor(c);
return k;
}
The object k is a kit that can create components suitable for a handheld display. |
| SOLUTION 18.3 | The comment ... |
Read now
Unlock full access