i hav a problem. i hav to shown 20-30 items on an canvas one after another. but i dont know to scroll the canvas. please help me.
i hav a problem. i hav to shown 20-30 items on an canvas one after another. but i dont know to scroll the canvas. please help me.
Hi,
To perform scrolling through canavs you have wrtie you own routine that should do following-
1-divide the canvas in three sections- status pane, main pane and command pane.
2- Now you need to decide teh height of every item and the number of item that will fit at once in your main pane.
3- store your items in a vector and draw the max. number of viewable items on to the canvas.
4- Now override the keyPressed() method to trap the DOWN key.
5- As soon as the DOWN key is pressed then take next lot of items from teh vector and redraw the screen.
Hope this will help you.
Regards
Amit