package org.fountanio.juancode.out;

import java.awt.BorderLayout;
import java.awt.GridLayout;

import javax.swing.*;
import javax.swing.border.Border;
import java.awt.event.*;

public class IPWindow extends JFrame {
	private static final long serialVersionUID = 1L;

	private JButton gotoip = new JButton("Go");
	private JButton gotoipf = new JButton("Go");
	private Border topborder = BorderFactory.createTitledBorder("Connect");
	private Border bottomborder = BorderFactory.createTitledBorder("Friends");
	private JTextField ipinput = new JTextField();
	private JList<String> friendlist = new JList(); 
	
	public IPWindow() { 
		super("Speed Civilization");
		setSize(400, 340);
		setLayout(new BorderLayout());
		ipinput.setBorder(topborder);
		gotoip.setBorder(topborder);
		gotoipf.setBorder(bottomborder);
		friendlist.setBorder(bottomborder);
		// actions
		
	}
	
	
}

@@ -63,36 +63,8 @@
 out;
-%0Aimport java.awt.GridLayout;
 %0A%0Aim
@@ -121,31 +121,276 @@
 er;%0A
-import java.awt.event.*
+%0Aimport org.fountanio.juancode.eng.Engine;%0Aimport org.lwjgl.openal.AL;%0Aimport org.lwjgl.opengl.Display;%0A%0Aimport java.awt.event.*;%0Aimport java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileReader;%0Aimport java.io.Reader
 ;%0A%0Ap
@@ -1083,11 +1083,371 @@
 %09%0A%09%7D%0A%09%0A%09
+void refreshList() %7B%0A%09%09try %7B%0A%09%09%09File file = new File(Engine.getAppDataDir() + %22%5C%5Cfountanio%5C%5Cspeedcivilization%5C%5Cfriends.fls%22);%09%09%0A%09%09%09Reader r = new FileReader(file);%0A%09%09%09BufferedReader reader = new BufferedReader(r);%0A%09%09%7D catch (FileNotFoundException e) %7B%0A%09%09%09Main.getConsole().errorln(%22Data directory NOT found!%5CnPerhaps you may want to restart the game?%22);%0A%09%09%7D%0A%09%7D
 %0A%7D%0A

Set up a few items