/* 
 * The structure of OLGA is fairly simple.  There is a network, which
 * is described in Network.java.  The network is an object that
 * contains a list of all the connections.  This list is an array of
 * Connection objects.  The Connection object contains data on an
 * individual connection, such as the IP, the user's name, the port,
 * and the socket (also an object).  The Connection and Network both
 * use their own member functions as well, which are used to
 * manipulate those objects.  More information on these objects is
 * available within Connection.java and Network.java.
 *
 * The user interacts with the program via a graphic interface.  The
 * interface is divided into three windows, each of which correspond
 * to an aspect of the structure of the program.  The main window
 * handles sending and receiving messages.  It uses the Peer thread to
 * receive these messages.  Outgoing messages are sent directly
 * through the interface with a call to Print_to_Socket, a member
 * function of Connection.  Another window manages the Network, and
 * prints a list of people on the network and friends who are
 * currently off. The Network window is also ideally used to connect
 * to people who are offline.  The third window is the Command window,
 * and is used to access options and preferences.
 * 
 * This is the main program for OLGA.  It establishes an instance of
 * the network object, then starts the Peer thread to wait for
 * connections from other people.  .
 */

import java.io.*;
import java.util.*;
import java.net.*;
import java.util.*;
import java.lang.*;
import javax.swing.*;
import java.awt.*;
import java.awt.Font.*;
import java.awt.event.*;
import Interface;
import Network;
import Peer;
import In;
import Connection;

public class olga5 {

    public static void main(String[] args)
    {
	/* font */
	Font thisFont;
	thisFont = new Font("Arial", Font.PLAIN, 10);
	
	/* instances of all the classes */
	Network net = new Network();
		
	Interface iface = new Interface();
	
	iface.GetPortWindow(net);

	JTextArea InMess = iface.init(net);

	Peer peer = new Peer();
		
	/* start listening for input.  may want to change this position. */
	peer.start(net.get_myPort(), InMess);
	
	In in = new In(net);
	in.start();
    } // end main
} //end olga
 

