I need help on something
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.
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);
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.
Last edited by sjalle; 01-07-2006 at 10:48 AM.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center