I'm attempting to create a program that acts as a server, and when it gets connections from a client, it sends the text and the client opens a new window and displays the text. I got it to connect and send and everything, but the text says "84" instead of what it's supposed to say. I don't know if that's a problem with the bytes or what. Well, here's my code. I've taken out a few of the non-needed classes.

Server code
Code:
package halturnerserver;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.lang.Thread.*;
import java.io.*;

class Window extends JFrame {    
    Window() {
        super("Server Control");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        Content x = new Content();
        
        add(x);
        
        pack();
        setVisible(true);
    }
}

class Content extends JPanel implements ActionListener {
    JPanel row1 = new JPanel();
    JPanel row2 = new JPanel();
    JLabel status = new JLabel("Disconnected");
    JButton connect = new JButton("Connect");
    JButton disconnect = new JButton("Disconnect");
    
    Content() {
        GridLayout gl = new GridLayout(1, 2, 1, 1);
        FlowLayout center = new FlowLayout(FlowLayout.CENTER);
        setLayout(gl);
        
        row1.setLayout(center);
        row2.setLayout(center);
        
        connect.setEnabled(true);
        disconnect.setEnabled(false);
        
        connect.addActionListener(this);
        disconnect.addActionListener(this);
        
        row1.add(status);
        row2.add(connect);
        row2.add(disconnect);
        
        add(row1);
        add(row2);
    }

    public void actionPerformed(ActionEvent evt) {
        Object o = evt.getSource();
        Server s = new Server();
        try {
            if(o == connect) {
                connect.setEnabled(false);
                disconnect.setEnabled(true);
                status.setText("Connected");
                s.start();
                s.setPriority(10);
            }
            if(o == disconnect) {
                connect.setEnabled(true);
                disconnect.setEnabled(false);
                status.setText("Disconnected");
                s.join();
            }
        }catch(InterruptedException e) {
            Error x = new Error(e.toString());
        }
    }
}

class Server extends Thread {
    public void run() {
        while(true) {
            try {
                int port = 4321;
                ServerSocket ss = new ServerSocket(port);
                while(true) {
                    Socket s = ss.accept();
                    
                    OutputStream os = s.getOutputStream();
                    DataOutputStream dos = new DataOutputStream(os);
                    dos.writeBytes("This is a test");
                    
                    s.close();
                }
            }
            catch(Exception e) {
            Error x = new Error(e.toString());
            }
        }
    }
}

class Error extends JFrame implements ActionListener {
    JButton ok = new JButton(" Ok ");
    Error(String text) {
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        
        JPanel row1 = new JPanel();
        JPanel row2 = new JPanel();
        JLabel message = new JLabel(text);
        
        GridLayout gl = new GridLayout(1, 2, 1, 1);
        setLayout(gl);
        FlowLayout center = new FlowLayout(FlowLayout.CENTER);
        
        row1.setLayout(center);
        row2.setLayout(center);
        
        ok.addActionListener(this);
        
        row1.add(message);
        row2.add(ok);
        
        add(row1);
        add(row2);
        
        pack();
        setVisible(true);
    }
    
    public void actionPerformed(ActionEvent evt) {
        Object o = evt.getSource();
        if(o == ok) {
            setVisible(false);
        }
    }
}

class Main {
    public static void main(String args[]) {
        Window x = new Window();
    }
}
Client code
Code:
package halturnerclient;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.lang.Thread.*;
import javax.swing.ImageIcon.*;
import java.io.*;

class Error extends JFrame implements ActionListener {
    JButton ok = new JButton(" Ok ");
    Error(String text) {
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        
        JPanel row1 = new JPanel();
        JPanel row2 = new JPanel();
        JLabel message = new JLabel(text);
        
        GridLayout gl = new GridLayout(2, 1, 1, 1);
        setLayout(gl);
        FlowLayout center = new FlowLayout(FlowLayout.CENTER);
        
        row1.setLayout(center);
        row2.setLayout(center);
        
        ok.addActionListener(this);
        
        row1.add(message);
        row2.add(ok);
        
        add(row1);
        add(row2);
        
        pack();
        setVisible(true);
    }
    
    public void actionPerformed(ActionEvent evt) {
        Object o = evt.getSource();
        if(o == ok) {
            setVisible(false);
        }
    }
}

class Window extends JFrame {
    Window() {
        super("Hal Turner Show");
        setSize(300, 150);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        Content x = new Content();
        
        add(x);
        
        setVisible(true);
    }
}

class Content extends JPanel implements ActionListener {
    Font titleFont = new Font("Dialog", Font.BOLD, 16);
    JPanel infoRow = new JPanel();
    JPanel buttonRow = new JPanel();
    JMenuBar menuBar = new JMenuBar();
    JMenu menu = new JMenu("File");
    JMenuItem about = new JMenuItem("About");
    JMenuItem help = new JMenuItem("Help");
    JButton connect = new JButton("Receive Data");
    JLabel message = new JLabel("No data has been sent for");
    
    Content() {
        BorderLayout bl = new BorderLayout();
        setLayout(bl);
        FlowLayout center = new FlowLayout(FlowLayout.CENTER);
        FlowLayout left = new FlowLayout(FlowLayout.LEFT);
        
        infoRow.setLayout(left);
        buttonRow.setLayout(center);
        
        connect.addActionListener(this);
        
        infoRow.add(message);
        buttonRow.add(connect);
        
        help.addActionListener(this);
        about.addActionListener(this);
        menu.add(help);
        menu.add(about);
        menuBar.add(menu);
        
        add(menuBar, BorderLayout.NORTH);
        add(infoRow, BorderLayout.SOUTH);
        add(buttonRow, BorderLayout.WEST);
        
        setVisible(true);
    }
    
    public void actionPerformed(ActionEvent evt) {
        Object o = evt.getSource();
        Client c = new Client();
        try {
            if(o == connect) {
                message.setText("Data has been sent for");
                c.start();
            }
            if(o == about) {
                About a = new About();
            }
            if(o == help) {
                Help h = new Help();
            }
        }catch(Exception e) {
            Error x = new Error(e.toString());
        }finally {
            try {
                c.join();
            }catch(Exception e) {
                Error er = new Error(e.toString());
            }
        }
    }
}

class Client extends Thread {
    public void run() {
        try {
            String server = "127.0.0.1";
            int port = 4321;
            
            Socket s = new Socket(server, port);
            
            InputStream is = s.getInputStream();
            DataInputStream dis = new DataInputStream(is);
            byte i = dis.readByte();
            Byte b = new Byte(i);
            
            Info info = new Info(b.toString());
            
            s.close();
        }catch(Exception e) {
            Error x = new Error(e.toString());
        }
    }
}

class Info extends JFrame {
    Info(String text) {
        super("Received Text from Server");
        setSize(300, 300);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        
        JPanel row = new JPanel();
        JLabel dataArea = new JLabel(text);
        
        FlowLayout center = new FlowLayout(FlowLayout.CENTER);
        setLayout(center);
        row.setLayout(center);
        
        row.add(dataArea);
        
        add(row);
        
        setVisible(true);
    }
}

class Main {
    public static void main(String args[]) {
        Window x = new Window();
    }
}