Sponsored Link •

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Hello All, I have a question about how to update/refresh text components in an applet. Appended below is a small test applet that approximates Pi numerically. There are two JTextFields, one that is used to input a number of iterations and a second one to show the result. Because the calculation can take a while, I would like the result JTextField to show "Working" while the calculation is proceeding, and then to show the numerical result when it has been computed. However, I can't figure out how to update the JTextField before the calculation is done. I include the source below. Thanks in advance for any ideas! // import java.awt.GridLayout; public class Pi_applet2 extends JApplet implements ActionListener {
Replies:

Sponsored Links
