DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links