Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

I need help on something

Hello
I'm new here.
I was just wondering if anyone knew how to put buttons overtop of an animated series of images in Java?
I would really apreciate it...
its a JApplet I am working on btw.
:WAVE:
[247 byte] By [Sin] at [2007-11-11 7:40:27]
# 1 Re: I need help on something
Extend a JPanel for drawing. Set its LayoutManager to null. Create your buttons and
issue a setBounds(x,y,width,height) for each of them before your to place them on the excact spot on your panel by a simple thePanel.add(button);
Important:
Do all your draiwing by overriding the JPanels paintComponent(Graphics g) method. Don't 'paint' the buttons, they will be placed on top og the drawing after the paintComponent method exits.

Good Luck !

PS: you can animate (move) the buttons by calling the buttons' setBounds and then the panel's validate/repaint method.
sjalle at 2007-11-11 22:37:36 >