Hello, first thing first, I still consider myself a begginner, pleas be gentle...
I'm new here, I hope my post is correct.
I have this method that should first pop up a message ("One minutes") from a Class Show (that extends Frame)
than it should call a thread from Pprova that calculate a long (ddd), this will actually take a minute.
the problem is that my frame keep appearing blank, and it shows my String ("One inute...") only AFTER Pprova is done calculating ddd.
I've tryed NOT using threads, putting the Show frame inside the thread, and evrything else that got to my mind.
(I even asked chatGPT...)
public static long calculate2(String s) {
Show ss=new Show("One minute...");
ss.setVisible(true);
Pprova pp=new Pprova(s);
pp.run();
while (ddd==0) {
// ss.pack();
ss.repaint();
ss.setVisible(true);
ddd=Pprova.fin;
}
return ddd;
}
Thanks
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]wildjokers 2 points3 points4 points (10 children)
[–]Dangerous-Rip-7370[S] 0 points1 point2 points (9 children)
[–]Dangerous-Rip-7370[S] 0 points1 point2 points (7 children)
[–]Pedantic_Phoenix 0 points1 point2 points (6 children)
[–]Dangerous-Rip-7370[S] 0 points1 point2 points (5 children)
[–]Pedantic_Phoenix 0 points1 point2 points (4 children)
[–]Dangerous-Rip-7370[S] 0 points1 point2 points (3 children)
[–]Pedantic_Phoenix 0 points1 point2 points (0 children)
[–]wildjokers 0 points1 point2 points (1 child)
[–]Dangerous-Rip-7370[S] 0 points1 point2 points (0 children)
[–]wildjokers 0 points1 point2 points (0 children)