您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Apply Index

Apply Page # 3

Activity 3 – Interacting with objects in a small software system

Run the TwoCircles application

A window should open, presenting at the top, buttons to choose either "circle1" or "circle2", on the left a set of buttons and on the right a drawing area showing two small, black circles. Your computer should look similar to the screen shot in the figure below (although below we see that circle1 has been made larger and its X-position changed):

image32.gif (4905 bytes)

By clicking on a button you will be sending a message to either circle1 or circle2 . You can select which circle a message will be sent to by first clicking the radio (round) button next to the object name circle1 or circle2 .

By clicking the appropriate message buttons perform the following tasks on the circle object:

(1) make circle1 blue

(2) make circle2 red

(3) make circle1 small by setting its radius to 10

(4) make circle2 large by setting its radius to 50

(4) explore the other message buttons

Discussion of Activity 3 – Interacting with objects in a small software system

Back to conten t

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg