SwingWorker « Text Input « Java Swing Q&A





1. SwingWorker vs setText    java-forums.org

/** * * @author Zaquia */ public class Gui_Client extends javax.swing.JDialog { private static ClientSnob client = null; /** Creates new form Gui_Server */ public Gui_Client(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); DocumentFilter textCheck = new TextToEncodeFilter(); ((AbstractDocument)jTextArea1.getDocument()).setDocumentFilter(textCheck); if (client == null) { client = new ClientSnob(); } imageLabel.setIcon(null); resultLabel.setText(null); ipLabel.setText(client.getIP()); keyDoneLabel.setText(""); fillKeyLabel(); }