Hi,
I'm creating a Gtk program (not Gnome) but I have a problem that stuff
doesn't refresh until I move my mouse over the window. It's hard to explain
the problem so here's an example program.
import org.gnu.gtk.*;
public class Test extends Thread {
Label label;
public static void main (String arg[]) {
Gtk.init(arg);
new Test();
Gtk.main();
}
public Test() {
Window window = new Window(WindowType.TOPLEVEL);
label = new Label("bevore");
window.add(label);
window.showAll();
start();
}
public void run() {
try {
sleep(1000);
} catch(InterruptedException e) {
}
label.setText("after");
//refresh?
}
}
The text "after" only show up after I move the mouse over the window and not
after 1 second. Do I have to add some refresh line or something? Or am I
doing something else wrong (I don't need App do I?) This happens for
everything I tried (labels, buttons, progressBar)
Thanks and happy new year ;)
David
|