repaint call « Graphics « Java Swing Q&A





1. Why is nothing painted when I call repaint()?    stackoverflow.com

First of all, I am a beginner. I'm trying to make a puzzle game using an array of Pieces. Each Piece represents a number from 1 to 9. I am trying ...

2. call to repaint() in paintComponent()    coderanch.com

Most of my Java experience is with Servlets so, in order to get more familiar with Swing, I was going through the chapter on Graphics Programming from Horstmann and Cornell's Core Java Vol. 1. What I found was that none of the sample programs displayed properly on my machine (I'm running Windows 98). The frame displayed, but nothing that was supposed ...

3. repaint() call not heeded    coderanch.com

Dear all, Please consider following applet that lets the user draw lines etc,... on a canvas. The call to repaint in the method mouseDragged()is not executed. Unless I minimize (and then restore) the browsers window. I have the same problem with an AWT-application. Similar code within swing works fine. But I need the applet! There must be something that I miss ...

4. repaint() won't call paint() and I'm out of ideas why    coderanch.com

I've been banging my head on this for a while now. In run() everything is peachy if I use show(). I'm pretty sure I need to use repaint() if I want to move the figure around the board without tracers. also, the thread doesn't quit when I close the app, but that's not my big problem now. heres the code (all ...

5. How to: call repaint() 4 times from other class.    coderanch.com

Hi all, I have a question about calling repaint() method from other class. The problem is that I can't call repaint() 4 times from other class. The result is always something like this: trying to repaint() 1 times... trying to repaint() 2 times... trying to repaint() 3 times... trying to repaint() 4 times... trying to repaint() 5 times... Actually doing repaint() ...