Problem with paint (Graphics g )


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Problem with paint (Graphics g )

Hybrid View

  1. #1
    Alan Guest

    Problem with paint (Graphics g )


    Hello,

    I am a student doing my final year project and I am having a problem with
    the animation that I have. I have used paint (Graphics g) to create the animation
    that I wish to be displayed and when i try to form a loop so when I press
    a play button the animation will run, It does not repaint the graphics at
    each step, it will only repaint the last value. I have put in print statements
    in all the methods and they are working correctly. I am using repaint() to
    call the paint(Graphics g). It also works fine when i press the button for
    each step. I just can get the play to work. can anyone help me ???????? please.


    Is there a way that I can force the repaint() to call the paint (graphics
    g) every time in the loop???


    Alan

  2. #2
    Ruchi Dhar Guest

    Re: Problem with paint (Graphics g )


    use update method instead of repaint

    "Alan " <9911308@student.ul.ie> wrote:
    >
    >Hello,
    >
    >I am a student doing my final year project and I am having a problem with
    >the animation that I have. I have used paint (Graphics g) to create the

    animation
    >that I wish to be displayed and when i try to form a loop so when I press
    >a play button the animation will run, It does not repaint the graphics at
    >each step, it will only repaint the last value. I have put in print statements
    >in all the methods and they are working correctly. I am using repaint()

    to
    >call the paint(Graphics g). It also works fine when i press the button for
    >each step. I just can get the play to work. can anyone help me ????????

    please.
    >
    >
    >Is there a way that I can force the repaint() to call the paint (graphics
    >g) every time in the loop???
    >
    >
    >Alan



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center