W
wnstnsmith
Dear all,
Perhaps this is a stupid question, but I cannot find the answer, so please
help:
In a java-application (not an applet), a series of pictures is processed. In
one corner of the application window there is a jpanel PEEP which should
show each picture as it is in the works, just to make the user happy that
the work is indeed being done.
The problem is that my picutres are duly processed, only the PEEP panel is
not repainted for each new picture that goes into the mill. Instead, it is
only repainted at the end of the whole loop, showing the last processed
picture.
Yes, the repaint instruction is in the loop, like this:
void process(img[] series) {
for (int i = 0; i < series.length; i++) {
PEEP.setPicture (series); //this puts the picture in PEEP
PEEP.repaint();
doWhatIsNeededWith(series);
}
}
what's wrong? tia.
WS
Perhaps this is a stupid question, but I cannot find the answer, so please
help:
In a java-application (not an applet), a series of pictures is processed. In
one corner of the application window there is a jpanel PEEP which should
show each picture as it is in the works, just to make the user happy that
the work is indeed being done.
The problem is that my picutres are duly processed, only the PEEP panel is
not repainted for each new picture that goes into the mill. Instead, it is
only repainted at the end of the whole loop, showing the last processed
picture.
Yes, the repaint instruction is in the loop, like this:
void process(img[] series) {
for (int i = 0; i < series.length; i++) {
PEEP.setPicture (series); //this puts the picture in PEEP
PEEP.repaint();
doWhatIsNeededWith(series);
}
}
what's wrong? tia.
WS