package edu.govschool.govchat.gui;

// We need to import our socket package
import edu.govschool.govchat.socket.*;
// JavaFX imports
import javafx.application.*;
import javafx.geometry.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.*;

/**
 * GUI for the GovChat client.
 * Most of the actual work is handled with <code>GCClientSocket</code>, this
 * provides us with a GUI to work with this socket and the entire client in
 * general.
 * @author Mr. Davis
 */
public class GCClient extends Application
{
    // Our GUI initially is very spartan, consisting of a large text area to
    // display messages sent and received, a entry field to enter messages, a
    // connect button and a send button. At first, we just connect using the
    // default host and port, localhost and 2000, so we don't need any elements
    // to input a custom host and port yet.
    private TextArea msgArea;
    private TextField entryField;
    private Button sendBtn;
    private Button connectBtn;
    
    // We need a client socket, since this is a client GUI
    private GCClientSocket clientSocket;
    
    // This flag will tell us if we're connected or not
    private boolean socketClosed = true;
    
    public static void main(String[] args)
    {
        launch(args);
    }
    
    @Override
    public void start(Stage primaryStage)
    {
        
    }
    
    private void sendBtn_click()
    {
        
    }
    
    private void connectBtn_click()
    {
    
    }
    
    private class ClientSocketListener implements GCSocketListener
    {
        @Override
        public void onMessage(final String line)
        {
            
        }
        
        @Override
        public void onCloseUpdate(final Boolean isClosed)
        {
            
        }
    }
}
    
@@ -1393,32 +1393,1374 @@
 )%0A    %7B%0A        
+// Initialize our GUI elements%0A        msgArea = new TextArea();%0A        entryField = new TextField();%0A        sendBtn = new Button(%22Send%22);%0A        connectBtn = new Button(%22Connect to localhost%22);%0A        %0A        // Set some options on our elements%0A        msgArea.setEditable(false); // Our messages should be read-only%0A        msgArea.setPrefColumnCount(20);%0A        msgArea.setPrefRowCount(20); // 20rows x 20characters big%0A        msgArea.setWrapText(true); // Our text will wrap if it's too big%0A        entryField.setPrefColumnCount(20); // Entry field is 20 characters wide%0A        entryField.setPromptText(%22Enter a message%22);%0A        %0A        // Set our event handlers%0A        sendBtn.setOnAction(e -%3E sendBtn_click());%0A        connectBtn.setOnAction(e -%3E connectBtn_click());%0A        %0A        // Organize our GUI%0A        HBox entryPane = new HBox(10, entryField, sendBtn);%0A        VBox pane = new VBox(10, msgArea, entryPane, connectBtn);%0A        pane.setAlignment(Pos.CENTER);%0A        %0A        // Display our GUI%0A        Scene scene = new Scene(pane);%0A        primaryStage.setScene(scene);%0A        %0A        // Set our window options%0A        primaryStage.setTitle(%22GovChat Client%22);%0A        primaryStage.setOnCloseRequest(e -%3E %7B%0A            if (clientSocket != null) clientSocket.shutdown();%0A        %7D);%0A        primaryStage.show();
 %0A    %7D%0A    %0A    

Implement GCClient GUI. No event handlers have been implemented