Socket « JTextArea « Java Swing Q&A





1. Thread Socket Server & Client with JFrame & JTextArea    forums.oracle.com

2. Client Side. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; public class GeoClient { private BufferedReader in; private PrintWriter out; private Socket socket; // private JFrame frame = new JFrame("Capitalize Client"); private JTextField dataField = new JTextField(40); // private JTextArea alarmWindow = new JTextArea(8, 40); public ...