User Interface

Goals: Problems

Solutions

                                   / -> Button
                                  /
              Object --> Component  -->  List
                                   \ 
                                    \ --> Textfield
                                     \
                                      \ --> Choice ....

Important Methods in Object and Component:

Components or Visual Controls

These descriptions are deliberately not complete, however they provide the flavor of these controls. The capabilities of these objects will probably change. Use a web-browser to get the latest Java.api details. There currently are about a dozen graphic widgets, each with as many as 70 methods and sometimes lots of constants. Do not try to learn them, but instead understand their general structure and how to use them. Moreover this number keeps changing. And you can create your own user-interface elements with them. Typically one builds the type of display desired by combining inheritance and composition.

Warning: The list of methods and graphical objects is not complete.

Graphics Methods, in java.awt.Graphics

All of this methods apply to a graphics object, e.g. to write "don't press" to the screen you would use:
        Graphics g = getGraphics();
        g.drawString("don't press",100,200);
   

Layout Managers

Layout managers can be nested. They permit reasonable ways to organize the graphical layout. You can define your own Layout Manager.