Re: please help me out



Praku wrote:
Hi,

I want to keep an animation to a frame in background and
labels,textboxes etc on foreground,for that what i have to do?
public class PrakuApplication{
JFrame frame;
AnimPanel ap;
JLabel label;
JTextArea textbox;

public PrakuApplication(){
frame = new JFrame();

ap = new AnimPanel();
ap.setLayout(.....);

label = new JLabel(.....);
textbox = new JTextArea();

ap.add(label);
ap.add(textbox);

frame.getContentPane(ap, BorderLayout.CENTER);
frame.setBounds(.....);
frame.setVisible(true);
}

public static void main(String[] args){
}
}

class AnimPanel extends JPanel{

public AnimPanel(){
// use javax.swing.Timer for running
// animation on this panel
...
}

public void paintComponent(Graphics g){
...
}
}

.



Relevant Pages

  • Re: Fade into a Picture Box or Image Control
    ... Joe users old P3 only manages to draw a couple of frames a second and the same animation takes forever. ... Dim StartTime As Long, EndTime As Long, TimeNow As Long ... Where DrawFrame() draw the frame at the given opacity, I prefer doing this rather than cluttering the animation loop ...
    (microsoft.public.vb.winapi.graphics)
  • Re: Sagnac Threads United
    ... I've made minor internal changes to my animation. ... My animation is NOW for a large rotating ring. ... nature of those 'apparent' motions in YOUR ROTATING frame. ...
    (sci.physics.relativity)
  • Re: How do I generate an animated pdf file from xfig/metapost
    ... I will post the source code below for an animation that ... I've done which illustrates how an ellipse is constructed. ... This PDF will have each frame of the ... Draw the ellipse dashed ...
    (comp.text.tex)
  • Re: Flashing a sprite
    ... you've reached the end of the animation, in which case frameIndex would go ... I guess the 2 would be my amount of seconds....but after gametime ... frames display frame 0, x amount of frames display frame 1" etc... ... you could just make a 2-frame animation for your flashing sprite. ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Timing issue
    ... I was advised that the best animation method is to update the animation on a time basis rather than frame basis, which i agree with so that even on varying procesor speds the animation will remain consistent. ... The opinions expressed in this message are my own personal views and do not reflect the official views of the Microsoft Corporation. ...
    (microsoft.public.win32.programmer.directx.managed)