In Java, AWT, repaint-method seems to be ignored in favor of start-method?

The repaint() call does not do the repaint - it schedules a repaint to be done. The actual repaint is carried out later by the event thread after any current and already scheduled events have been finished (it may happen even later than that for other reasons not relevant here). The start() method is called immediately after the scheduling is done, as part of responding to the current event.

So yes, the actual paint will always take place after start() is called.

DJClayworth has already explained why your app behaves as it does, but if you're working with a JComponent and you absolutely need repainting to happen during your own event handling, you can use one of the JComponent. PaintImmediately() methods. However, you should probably spend some time first deciding whether you can refactor your code to have the start() functionality happen outside of the event dispatch thread.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions