Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Problem #1</h2> <p>The components you are trying to update are not, in any way, connected to the screen...</p> <pre><code>public JTextArea estado = new JTextArea(); public JTextField updatedVersion = new JTextField(); public JLabel updatedLabel = new JLabel(); </code></pre> <p>That means, anytime you interact with these components, it's doing nothing to what's on the screen...</p> <h2>Problem #2</h2> <p>You're trying to make modifications to the UI from outside the context of the Event Dispatching Thread. This is significant violation of the Swing threading rules.</p> <pre><code>public class Check extends SwingWorker&lt;String, String&gt; { private JTextArea estado; Private JTextField updatedVersion; private JLabel updatedLabel; private String catchUpdatedVersion; int UPDATENUMBER; int CURRENTNUMBER; public Check(JTextArea estado, JTextField updatedVersion, JLabel updatedLabel) { this.estado = estado; this.updatedVersion = updatedVersion; this.updatedLabel = updatedLabel; } protected void process(List&lt;String&gt; values) { for (String value : values) { estado.append(value); } } protected String doInBackground() throws Exception { String infURL = "https://thread.googlecode.com/svn/trunk/thread.inf"; String name = "thread.inf"; File file = new File(name); URLConnection conn = new URL(infURL).openConnection(); conn.connect(); publish("Conectando al servidor..."); publish(System.getProperty("line.separator")); publish(" -- Buscando actualizaciones... --"); publish(System.getProperty("line.separator")); /*...*/ } } </code></pre> <p>IfYou need to do any post-processing, then you also override <code>done</code> which will be called after <code>doInBackground</code> has existed, but is called within the context of the EDT</p> <p>For more details read through <a href="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/" rel="nofollow">Concurrency in Swing</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload