public void init() {

		// Set up Applet
		setSize(this.appletDimension);

		// Panels
		this.titlePanel = new JPanel();
		this.inputPanel = new JPanel();
		this.buttonPanel = new JPanel();
		this.errorPanel = new JPanel();
		this.mainPanel = new JPanel();

		// Title
		this.title = new JLabel("Client Parameters");
		this.titlePanel.setMaximumSize(this.standardDimension);
		
		// Add to titlePanel
		this.titlePanel.add(title);

		// Input Panel
		this.inputPanel.setLayout(new GridLayout(3, 2));
		this.inputPanel.setMaximumSize(this.standardDimension);

		// Button Panel
		this.buttonPanel.setMaximumSize(this.standardDimension);

		// Error Message
		this.errorPanel.setMaximumSize(this.standardDimension);
	
		
		// Local Port
		this.localPortLabel = new JLabel("Local Port: ");
		this.localPortLabel.setAlignmentX(LEFT_ALIGNMENT);
		this.localPortLabel.setSize(this.labelDimension);
		this.localPortInput = new JTextField();
		if(this.debug)
			this.localPortInput = new JTextField("8888");
		this.localPortInput.setPreferredSize(this.inputDimension);

		// Add to inputPanel
		this.inputPanel.add(this.localPortLabel);
		this.inputPanel.add(this.localPortInput);

		
		// Server Name
		this.serverNameLabel = new JLabel("Server Name: ");
		this.serverNameLabel.setSize(this.labelDimension);
		this.serverNameInput = new JTextField();
		if(this.debug) {
			this.serverNameInput = new JTextField("lsmitcw7");
			//this.serverNameInput = new JTextField("lolivbw7");
		}
		this.serverNameInput.setPreferredSize(this.inputDimension);
		
		// Add to inputPanel
		this.inputPanel.add(this.serverNameLabel);
		this.inputPanel.add(this.serverNameInput);

		
		// Server Port
		this.serverPortLabel = new JLabel("Server Port: ");
		this.serverPortLabel.setSize(this.labelDimension);
		this.serverPortInput = new JTextField();
		if(this.debug)
			this.serverPortInput = new JTextField("9999");
		this.serverPortInput.setPreferredSize(this.inputDimension);
		
		// Add to inputPanel
		this.inputPanel.add(this.serverPortLabel);
		this.inputPanel.add(this.serverPortInput);


		// Buttons
		this.startButton = new JButton(this.startButtonLabel);
		this.startButton.setPreferredSize(this.buttonDimension);

		this.stopButton = new JButton(this.stopButtonLabel);
		this.stopButton.setPreferredSize(this.buttonDimension);
		this.stopButton.setVisible(false);

		// Add to buttonPanel
		this.buttonPanel.add(this.startButton);
		this.buttonPanel.add(this.stopButton);

		
		// Error Message
		this.errorMessage = new JLabel(" ");
		this.errorMessage.setForeground(Color.RED);
		
		// Add to errorPanel
		this.errorPanel.add(this.errorMessage);
		this.errorPanel.setBorder(BorderFactory.createLineBorder(Color.black));
		
		
		// Set up JTextPane: output
		this.outputTextPane = new JTextPane();
		
		// Set up Styles
		this.styledDocument = outputTextPane.getStyledDocument();

		style = outputTextPane.addStyle("ConsoleOutput", null);
        
        
        // Redirect System.out to the outputConsole 
//		System.setOut(new PrintStream(new OutputStream() {
//			public void write(int b) throws IOException {
//				StyleConstants.setForeground(style, Color.blue);
//				try { 
//					styledDocument.insertString(styledDocument.getLength(), ("" + (char)b), style); 
//				} catch (BadLocationException e) {
//				}
//			}
//		}));
		
		// Redirect System.err to the outputConsole
		System.setErr(new PrintStream(new OutputStream() {
			public void write(int b) throws IOException {
				StyleConstants.setForeground(style, Color.red);
				try { 
					styledDocument.insertString(styledDocument.getLength(), ("" + (char)b), style); 
				} catch (BadLocationException e) {
				}
			}
		}));
	
		        
		// Set up JScrollPane
		this.scrollPane = new JScrollPane(this.outputTextPane);

		
		// Setup and Add panels to main panel
		this.mainPanel.setLayout(new BoxLayout(this.mainPanel, BoxLayout.Y_AXIS));
		this.mainPanel.add(this.titlePanel);
		this.mainPanel.add(this.inputPanel);
		this.mainPanel.add(this.buttonPanel);
		this.mainPanel.add(this.errorPanel);
		this.mainPanel.add(this.scrollPane);

		// Container = JApplet container
		Container window = getContentPane();
		window.setLayout(new GridLayout(1, 1));
		this.startButton.addActionListener(new ButtonListener());
		stopButton.addActionListener(new ButtonListener());
		
		// Add mainPanel to container: window
		window.add(this.mainPanel);
	}