|
-
Aug 22nd, 2005, 04:05 AM
#1
Thread Starter
Lively Member
setLayout() and addActionListener().
hey guys.
i have two questions.
first of all, what does the setLayout do in the applet.
second, i am having trouble understanding when to put the parameter in the addActionListener "this" or "canvas". since in some examples that i have seen, there is a canvas and a button. To change the color of the text drawn on the canvas when button is pressed, the button's actionlistener is added to the applet. but in other cases like when moveing the mose over the canvas to draw, the actionlistener is added to the canvas.
i don''t understand why, i mean aren't both actions supposed to be listened byy the canvas?
thanks for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|