![]() ![]() ![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Training Index
Component Madnessby
Exercise
API Docs
About This Short Course
Short Course
Exercises
Help is available for each task.
Task 1Add a new You can do this in several ways. First, create the Label someLabel = new Label(); someLabel.setText("Some Components"); add(someLabel); Second, you can create the Label someLabel = new Label("Some Components"); add(someLabel); Finally, you can combine all the steps into a single statement if you will
not need a reference to the add(new Label("Some components")); Task 2Add a new You can do this in several ways. First, create the Button someButton = new Button(); someButton.setLabel("Ok"); add(someButton); Second, you can create the Button someButton = new Button("Ok"); add(someButton); Finally, you can combine all the steps into a single statement if you will
not need a reference to the add(new Button("Ok")); Task 3Add another Similar to the last task, you can do this as follows:. add(new Button("A Big Button")); Task 4Add a new You can do this in several ways. First, create the Checkbox someCheckbox = new Checkbox(); someCheckbox.setLabel("Anybody home?"); add(someCheckbox); Second, you can create the Checkbox someCheckbox = new Checkbox("Anybody home?"); add(someCheckbox); Finally, you can combine all the steps into a single statement if you will
not need a reference to the add(new Checkbox("Anybody home?")); Task 5Add a new Note: The number of columns that you pass represents the preferred number of characters to be visible. This means: You can do this in several ways. First, create the TextField someTextField = new TextField(); someTextField.setColumns(20); add(someTextField); Second, you can create the TextField someTextField = new TextField(20); add(someTextField); Finally, you can combine all the steps into a single statement if you will
not need a reference to the add(new TextField(20)); Task 6Add a new You can do this in several ways. First, create the TextArea someTextArea = new TextArea(); someTextArea.setRows(5); someTextArea.setColumns(10); add(someTextArea); Second, you can create the TextArea someTextField = new TextArea(4,10); add(someTextArea); Finally, you can combine all the steps into a single statement if you will
not need a reference to the add(new TextArea(4,10));
Copyright 1996-2000 jGuru.com. All Rights Reserved. |