Index: gamegui/Align.java
===================================================================
--- gamegui/Align.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
+++ gamegui/Align.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -0,0 +1,7 @@
+package gamegui;
+
+public enum Align {
+  Center,
+  Right,
+  Left
+}
Index: gamegui/Animation.java
===================================================================
--- gamegui/Animation.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Animation.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -1,42 +1,96 @@
 package gamegui;
 
-import java.awt.*;
-import java.awt.image.*;
-import java.util.*;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.util.ArrayList;
 
-public class Animation extends Member
-{
-	ArrayList<BufferedImage> frames;
-	int currentFrame;
-	int drawInterval;
-	long lastFrameChange;
-	
-	public Animation(String newName, int newX, int newY, int newWidth, int newHeight, int newInterval)
-	{
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		frames = new ArrayList<BufferedImage>();
-		currentFrame = 0;
-		drawInterval = newInterval;
-		lastFrameChange = 0;
-	}
-	
-	public void addFrame(BufferedImage newFrame)
-	{
-		frames.add(newFrame);
-	}
-	
-	public void draw(Graphics g)
-	{
-		if(System.currentTimeMillis() - lastFrameChange > drawInterval)
-		{
-			currentFrame++;
-			if(currentFrame >= frames.size())
-				currentFrame = 0;
-			
-			lastFrameChange = System.currentTimeMillis();
-		}
-		
-    	g.drawImage(frames.get(currentFrame), getX(), getY(), null);
-	}
+public class Animation extends Member {
+
+  public ArrayList<BufferedImage> frames;
+  public long drawInterval;
+  public boolean wrap;
+
+  int currentFrame;
+  long lastFrameChange;
+  boolean reachedEnd;
+
+  public Animation(String newName, int newX, int newY, int newWidth, int newHeight, int newInterval, boolean wrap) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.frames = new ArrayList<BufferedImage>();
+    this.currentFrame = 0;
+    this.drawInterval = newInterval;
+    this.lastFrameChange = 0L;
+    this.reachedEnd = false;
+    this.wrap = wrap;
+  }
+
+  public Animation(Animation copy) {
+    super(copy.getName(), copy.getX(), copy.getY(), copy.getWidth(), copy.getHeight());
+    this.frames = copy.frames;
+    this.currentFrame = copy.currentFrame;
+    this.drawInterval = copy.drawInterval;
+    this.lastFrameChange = 0L;
+    this.reachedEnd = false;
+    this.wrap = copy.wrap;
+  }
+
+  public void addFrame(BufferedImage newFrame) {
+    this.frames.add(newFrame);
+    setWidth(newFrame.getWidth());
+    setHeight(newFrame.getHeight());
+  }
+
+  public void draw(Graphics g) {
+    if (this.lastFrameChange == 0L)
+      this.lastFrameChange = System.currentTimeMillis(); 
+    if (System.currentTimeMillis() - this.lastFrameChange > this.drawInterval) {
+      this.currentFrame++;
+      if (this.currentFrame >= this.frames.size()) {
+        if (this.wrap) {
+          this.currentFrame = 0;
+        } else {
+          this.currentFrame--;
+        }
+        this.reachedEnd = true;
+      }
+      this.lastFrameChange = System.currentTimeMillis();
+    }
+    g.drawImage(this.frames.get(this.currentFrame), getX(), getY(), null);
+  }
+
+  public void draw(Graphics g, int x, int y) {
+    if (this.lastFrameChange == 0L)
+      this.lastFrameChange = System.currentTimeMillis(); 
+    if (System.currentTimeMillis() - this.lastFrameChange > this.drawInterval) {
+      this.currentFrame++;
+      if (this.currentFrame >= this.frames.size()) {
+        if (this.wrap) {
+          this.currentFrame = 0;
+        } else {
+          this.currentFrame--;
+        }
+        this.reachedEnd = true;
+      }
+      this.lastFrameChange = System.currentTimeMillis();
+    }
+    g.drawImage(this.frames.get(this.currentFrame), getX() + x - ((BufferedImage)this.frames.get(this.currentFrame)).getWidth() / 2, getY() + y - ((BufferedImage)this.frames.get(this.currentFrame)).getHeight(), null);
+  }
+
+  public boolean reachedEnd() {
+    return this.reachedEnd;
+  }
+
+  public void reset() {
+    this.reachedEnd = false;
+    this.currentFrame = 0;
+    this.lastFrameChange = 0L;
+  }
+
+  public int getWidth() {
+    return ((BufferedImage)this.frames.get(this.currentFrame)).getWidth();
+  }
+
+  public int getHeight() {
+    return ((BufferedImage)this.frames.get(this.currentFrame)).getHeight();
+  }
 }
Index: gamegui/Button.java
===================================================================
--- gamegui/Button.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Button.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -2,38 +2,58 @@
 
 import java.awt.*;
+import java.awt.image.BufferedImage;
 
-public class Button extends Member
-{
-	private String text;
-	private Font font;
-	
-	public Button(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont)
-	{
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		text = newText;
-		font = newFont;
-	}
-	
-	public void draw(Graphics g)
-	{
-		FontMetrics metrics = g.getFontMetrics(font);
-		
-		g.setColor(Color.red);
-		g.drawRect(getX(), getY(), getWidth(), getHeight());
-		
-		g.setColor(Color.green);
-		g.setFont(font);
-		g.drawString(text, getX() + (getWidth() - metrics.stringWidth(text))/2, getY() + (getHeight() + metrics.getHeight())/2 - 2);
-	}
-	
-	public boolean isClicked(int xCoord, int yCoord)
-	{
-		if(xCoord < getX() || getX() + getWidth() < xCoord)
-			return false;
-		if(yCoord < getY() || getY() + getHeight() < yCoord)
-			return false;
-		
-			return true;
-	} 
+public class Button extends Member {
+
+  private String text;  
+  private Font font;
+  private BufferedImage img;
+  private Align alignment;
+
+  public Button(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.text = newText;
+    this.font = newFont;
+    this.img = null;
+    this.alignment = Align.Left;
+  }
+
+  public Button(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont, Align alignment) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.text = newText;
+    this.font = newFont;
+    this.img = null;
+    this.alignment = alignment;
+  }
+
+  public Button(String newName, int newX, int newY, int newWidth, int newHeight, BufferedImage img) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.text = "";
+    this.font = null;
+    this.img = img;
+    this.alignment = Align.Left;
+  }
+
+  public void draw(Graphics g) {
+    if (this.img == null) {
+      FontMetrics metrics = g.getFontMetrics(this.font);
+      g.setColor(Color.red);
+      g.drawRect(getX(), getY(), getWidth(), getHeight());
+      g.setColor(Color.green);
+      g.setFont(this.font);
+      switch (this.alignment) {
+        case Center:
+          g.drawString(this.text, getX() + (getWidth() - metrics.stringWidth(this.text)) / 2, getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+          break;
+        case Right:
+          g.drawString(this.text, getX() + getWidth() - metrics.stringWidth(this.text), getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+          break;
+        case Left:
+          g.drawString(this.text, getX() + (getWidth() - metrics.stringWidth(this.text)) / 2, getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+          break;
+      }
+    } else {
+      g.drawImage(this.img, getX() + (getWidth() - this.img.getWidth()) / 2, getY() + (getHeight() - this.img.getHeight()) / 2 - 2, null);
+    }
+  }
 }
Index: gamegui/Label.java
===================================================================
--- gamegui/Label.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Label.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -3,45 +3,43 @@
 import java.awt.*;
 
-public class Label extends Member
-{
-	private String text;
-	private Font font;
-	private boolean centered;
-	private boolean fixed;
-	
-	public Label(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont, boolean centered) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		text = newText;
-		font = newFont;
-		this.centered = centered;
-		fixed = false;
-	}
-	
-	public Label(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont, boolean centered, boolean fixed) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		text = newText;
-		font = newFont;
-		this.centered = centered;
-		this.fixed = fixed;
-	}
-	
-	public void setText(String s) {
-		text = s;
-	}
-	
-	public void draw(Graphics g) {
-		FontMetrics metrics = g.getFontMetrics(font);
-		
-		g.setColor(Color.green);
-		g.setFont(font);
-		
-		if(centered)
-			g.drawString(text, getX() + (getWidth() - metrics.stringWidth(text))/2, getY() + (getHeight() + metrics.getHeight())/2 - 2);
-		else if(fixed)
-			g.drawString(text, getX(), getY());
-		else
-			g.drawString(text, getX(), getY() + (getHeight() + metrics.getHeight())/2 - 2);
-	}
+public class Label extends Member {
+
+  private String text;  
+  private Font font;
+  private Align alignment;
+
+  public Label(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.text = newText;
+    this.font = newFont;
+    this.alignment = Align.Center;
+  }
+
+  public Label(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont, Align alignment) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.text = newText;
+    this.font = newFont;
+    this.alignment = alignment;
+  }
+
+  public void setText(String s) {
+    this.text = s;
+  }
+
+  public void draw(Graphics g) {
+    FontMetrics metrics = g.getFontMetrics(this.font);
+    g.setColor(Color.green);
+    g.setFont(this.font);
+    switch (this.alignment) {
+      case Center:
+        g.drawString(this.text, getX() + (getWidth() - metrics.stringWidth(this.text)) / 2, getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+        break;
+      case Right:
+        g.drawString(this.text, getX() + getWidth() - metrics.stringWidth(this.text), getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+        break;
+      case Left:
+        g.drawString(this.text, getX(), getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+        break;
+    }
+  }
 }
Index: gamegui/Listable.java
===================================================================
--- gamegui/Listable.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Listable.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -1,7 +1,12 @@
 package gamegui;
 
-import java.awt.*;
+import java.awt.Graphics;
 
 public interface Listable {
-	public void drawListString(int x, int y, Graphics g);
+
+  void draw(int paramInt1, int paramInt2, Graphics paramGraphics);
+  int getHeight();
+  int getWidth();
+  int getXOffset();
+  int getYOffset();
 }
Index: gamegui/Member.java
===================================================================
--- gamegui/Member.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Member.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -1,74 +1,80 @@
 package gamegui;
 
-import java.awt.*;
-import java.awt.event.*;
+import java.awt.Graphics;
+import java.awt.event.MouseEvent;
 
 public class Member {
-	private String name;
-	private int x;
-	private int y;
-	private int width;
-	private int height;
-	private ScrollBar scrollbar;
-	
-	public Member(String newName, int newX, int newY, int newWidth, int newHeight) {
-		name = newName;
-		x = newX;
-		y = newY;
-		width = newWidth;
-		height = newHeight;
-	}
-	
-	public void draw(Graphics g) {
 
-	}
-	
-	public boolean handleEvent(MouseEvent e) {
-		return false;
-	}
-	
-	public boolean isClicked(int xCoord, int yCoord) {
-		return x <= xCoord && xCoord <= x+width && y <= yCoord && yCoord <= y+height;
-	}
-	
-	public void clear() {
-		
-	}
-	
-	public String getName() {
-		return name;
-	}
-	
-	public int getX() {
-		return x;
-	}
-	
-	public int getY() {
-		return y;
-	}
-	
-	public int getWidth() {
-		return width;
-	}
-	
-	public int getHeight() {
-		return height;
-	}
-	
-	public ScrollBar getScrollBar() {
-		return scrollbar;
-	}
+  private String name;  
+  private int x;
+  private int y;
+  private int width;
+  private int height;
+  private ScrollBar scrollbar;
 
-	public void addScrollBar(ScrollBar newBar) {
-		newBar.offset(x, y);
-		scrollbar = newBar;
-	}
-	
-	protected void offset(int xOffset, int yOffset) {
-		x += xOffset;
-		y += yOffset;
-		
-		if(scrollbar != null)
-			scrollbar.offset(xOffset, yOffset);
-	}
+  public Member(String newName, int newX, int newY, int newWidth, int newHeight) {
+    this.name = newName;
+    this.x = newX;
+    this.y = newY;
+    this.width = newWidth;
+    this.height = newHeight;
+  }
+
+  public void draw(Graphics g) {}
+
+  public boolean handleEvent(MouseEvent e) {
+    return false;
+  }
+
+  public boolean isClicked(int xCoord, int yCoord) {
+    return (this.x <= xCoord && xCoord <= this.x + this.width && this.y <= yCoord && yCoord <= this.y + this.height);
+  }
+
+  public void clear() {
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public int getX() {
+    return this.x;
+  }
+
+  public int getY() {
+    return this.y;
+  }
+
+  public int getWidth() {
+    return this.width;
+  }
+
+  public int getHeight() {
+    return this.height;
+  }
+
+  public ScrollBar getScrollBar() {
+    return this.scrollbar;
+  }
+
+  public void setWidth(int width) {
+    this.width = width;
+  }
+
+  public void setHeight(int height) {
+    this.height = height;
+  }
+
+  public void addScrollBar(ScrollBar newBar) {
+    newBar.offset(this.x, this.y);
+    this.scrollbar = newBar;
+  }
+
+  protected void offset(int xOffset, int yOffset) {
+    this.x += xOffset;
+    this.y += yOffset;
+    if (this.scrollbar != null) {
+      this.scrollbar.offset(xOffset, yOffset);
+    }
+  }
 }
Index: gamegui/Menu.java
===================================================================
--- gamegui/Menu.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Menu.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -1,93 +1,84 @@
 package gamegui;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
 
 public class Menu extends Member {
-	private ArrayList<String> items;
-	private int selectedIndex;
-	private String label;
-	private Font font;
-	private boolean open;	//determines if the menu is pulled down
-	private FontMetrics metrics;
-	
-	public Menu(String newName, int newX, int newY, int newWidth, int newHeight, String newLabel, Font newFont) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		items = new ArrayList<String>();
-		selectedIndex = -1;
-		label = newLabel;
-		font = newFont;
-		open = false;
-	}
-	
-	public boolean handleEvent(MouseEvent e) {
-		if(getX()+metrics.stringWidth(label)+4 <= e.getX() && e.getX() <= getX()+getWidth() && getY()+getHeight() <= e.getY() && e.getY() <= getY()+getHeight()+15*items.size() && open) {
-			selectedIndex = (e.getY()-getY()-getHeight())/15;
-			open = false;
-			return true;
-		}
-		
-		if(getX()+getWidth()-getHeight() <= e.getX() && e.getX() <= getX()+getWidth() && getY() <= e.getY() && e.getY() <= getY()+getHeight()) {
-			open = !open;
-			return true;
-		}
-	
-		return false;
-	}
-	
-	public void clear() {
-		if(selectedIndex != -1)
-			selectedIndex = 0;
-	}
-	
-	public void draw(Graphics g)
-	{
-		metrics = g.getFontMetrics(font);
-		
-		g.setColor(Color.black);
-    	g.fillRect(getX(), getY(), getWidth(), getHeight());
-    	
-    	g.setColor(Color.red);
-		g.drawRect(getX(), getY(), getWidth(), getHeight());
-		
-		g.drawLine(getX()+metrics.stringWidth(label)+4, getY(), getX()+metrics.stringWidth(label)+4, getY()+getHeight());
-		g.drawLine(getX()+getWidth()-getHeight(), getY(), getX()+getWidth()-getHeight(), getY()+getHeight());
-    	
-		g.drawLine(getX()+getWidth()-getHeight()*17/20, getY()+getHeight()*3/20, getX()+getWidth()-getHeight()*3/20, getY()+getHeight()*3/20);
-		g.drawLine(getX()+getWidth()-getHeight()*17/20, getY()+getHeight()*3/20, getX()+getWidth()-getHeight()/2, getY()+getHeight()*17/20);
-		g.drawLine(getX()+getWidth()-getHeight()/2, getY()+getHeight()*17/20, getX()+getWidth()-getHeight()*3/20, getY()+getHeight()*3/20);
-		
-		g.setColor(Color.green);
-		g.setFont(font);
-		g.drawString(label, getX()+2, getY()+(getHeight()+metrics.getHeight())/2-2);
-		g.drawString(items.get(selectedIndex), getX()+metrics.stringWidth(label)+8, getY()+(getHeight()+metrics.getHeight())/2-2);
-		
-		if(open) {
-			g.setColor(Color.black);
-	    	g.fillRect(getX()+metrics.stringWidth(label)+4, getY()+getHeight(), getWidth()-metrics.stringWidth(label)-4, items.size()*15);
-	    	
-	    	g.setColor(Color.red);
-			g.drawRect(getX()+metrics.stringWidth(label)+4, getY()+getHeight(), getWidth()-metrics.stringWidth(label)-4, items.size()*15);
-	    	
-	    	if(selectedIndex != -1) {
-				g.setColor(Color.blue);
-		    	g.fillRect(getX()+metrics.stringWidth(label)+5, getY()+getHeight()+1+15*selectedIndex, getWidth()-metrics.stringWidth(label)-5, 14);
-			}
-			
-	    	g.setColor(Color.green);
-			for(int x=0; x<items.size(); x++)
-				g.drawString(items.get(x), getX()+metrics.stringWidth(label)+8, getY()+(getHeight()+metrics.getHeight())/2+15*(x+1));
-		}
-	}
-	
-	public void add(String newString) {
-		selectedIndex = 0;
-		items.add(newString);
-	}
-	
-	public String getSelected() {
-		return items.get(selectedIndex);
-	}
+
+  private ArrayList<String> items;
+  private int selectedIndex;
+  private String label;
+  private Font font;
+  private boolean open;
+  private FontMetrics metrics;
+
+  public Menu(String newName, int newX, int newY, int newWidth, int newHeight, String newLabel, Font newFont) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.items = new ArrayList<String>();
+    this.selectedIndex = -1;
+    this.label = newLabel;
+    this.font = newFont;
+    this.open = false;
+  }
+
+  public boolean handleEvent(MouseEvent e) {
+    if (getX() + this.metrics.stringWidth(this.label) + 4 <= e.getX() && e.getX() <= getX() + getWidth() && getY() + getHeight() <= e.getY() && e.getY() <= getY() + getHeight() + 15 * this.items.size() && this.open) {
+      this.selectedIndex = (e.getY() - getY() - getHeight()) / 15;
+      this.open = false;
+      return true;
+    }
+    if (getX() + getWidth() - getHeight() <= e.getX() && e.getX() <= getX() + getWidth() && getY() <= e.getY() && e.getY() <= getY() + getHeight()) {
+      this.open = !this.open;
+      return true;
+    }
+    return false;
+  }
+
+  public void clear() {
+    if (this.selectedIndex != -1)
+      this.selectedIndex = 0; 
+  }
+
+  public void draw(Graphics g) {
+    this.metrics = g.getFontMetrics(this.font);
+    g.setColor(Color.black);
+    g.fillRect(getX(), getY(), getWidth(), getHeight());
+    g.setColor(Color.red);
+    g.drawRect(getX(), getY(), getWidth(), getHeight());
+    g.drawLine(getX() + this.metrics.stringWidth(this.label) + 4, getY(), getX() + this.metrics.stringWidth(this.label) + 4, getY() + getHeight());
+    g.drawLine(getX() + getWidth() - getHeight(), getY(), getX() + getWidth() - getHeight(), getY() + getHeight());
+    g.drawLine(getX() + getWidth() - getHeight() * 17 / 20, getY() + getHeight() * 3 / 20, getX() + getWidth() - getHeight() * 3 / 20, getY() + getHeight() * 3 / 20);
+    g.drawLine(getX() + getWidth() - getHeight() * 17 / 20, getY() + getHeight() * 3 / 20, getX() + getWidth() - getHeight() / 2, getY() + getHeight() * 17 / 20);
+    g.drawLine(getX() + getWidth() - getHeight() / 2, getY() + getHeight() * 17 / 20, getX() + getWidth() - getHeight() * 3 / 20, getY() + getHeight() * 3 / 20);
+    g.setColor(Color.green);
+    g.setFont(this.font);
+    g.drawString(this.label, getX() + 2, getY() + (getHeight() + this.metrics.getHeight()) / 2 - 2);
+    g.drawString(this.items.get(this.selectedIndex), getX() + this.metrics.stringWidth(this.label) + 8, getY() + (getHeight() + this.metrics.getHeight()) / 2 - 2);
+    if (this.open) {
+      g.setColor(Color.black);
+      g.fillRect(getX() + this.metrics.stringWidth(this.label) + 4, getY() + getHeight(), getWidth() - this.metrics.stringWidth(this.label) - 4, this.items.size() * 15);
+      g.setColor(Color.red);
+      g.drawRect(getX() + this.metrics.stringWidth(this.label) + 4, getY() + getHeight(), getWidth() - this.metrics.stringWidth(this.label) - 4, this.items.size() * 15);
+      if (this.selectedIndex != -1) {
+        g.setColor(Color.blue);
+        g.fillRect(getX() + this.metrics.stringWidth(this.label) + 5, getY() + getHeight() + 1 + 15 * this.selectedIndex, getWidth() - this.metrics.stringWidth(this.label) - 5, 14);
+      }
+      g.setColor(Color.green);
+      for (int x = 0; x < this.items.size(); x++)
+        g.drawString(this.items.get(x), getX() + this.metrics.stringWidth(this.label) + 8, getY() + (getHeight() + this.metrics.getHeight()) / 2 + 15 * (x + 1)); 
+    }
+  }
+
+  public void add(String newString) {
+    this.selectedIndex = 0;
+    this.items.add(newString);
+  }
+
+  public String getSelected() {
+    return this.items.get(this.selectedIndex);
+  }
 }
Index: gamegui/MultiTextbox.java
===================================================================
--- gamegui/MultiTextbox.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/MultiTextbox.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -3,150 +3,151 @@
 import java.awt.*;
 import java.awt.event.*;
-import java.awt.image.*;
-import java.util.*;
+import java.awt.image.BufferedImage;
+import java.util.ArrayList;
 
 public class MultiTextbox extends Textbox {
-	ArrayList<String> lstStrings;
-	FontMetrics metrics;
-	boolean active;
-	
-	public MultiTextbox(String newName, int newX, int newY, int newWidth, int newHeight, String newLabel, boolean isActive, Font newFont, FontMetrics newMetrics) {
-		super(newName, newX, newY, newWidth, newHeight, newLabel, newFont, false);
-	
-		lstStrings = new ArrayList<String>();
-		metrics = newMetrics;
-		active = isActive;
-		
-		splitString();
-	}
-	
-	public void append(String str) {
-		if(getText().equals(""))
-			setText(str);
-		else
-			setText(getText() + "\n" + str);
-		
-		splitString();
-		
-		if(lstStrings.size()*15+6 > getHeight())
-			getScrollBar().setSize(getScrollBar().getMaxSize()*getHeight()/(lstStrings.size()*15+6));
-		else
-			getScrollBar().setSize(getScrollBar().getMaxSize());
-	
-		getScrollBar().setPosition(getScrollBar().getMaxSize()-getScrollBar().getSize());
-	}
-	
-	public void clear() {
-		super.clear();
-		lstStrings = new ArrayList<String>();
-	}
 
-	public boolean handleEvent(MouseEvent e) {
-		if(!getScrollBar().handleEvent(e))
-			return false;
-		
-		if(e.getY() < getY()+getWidth()) {
-			changeTextStart(-30);
-		}else if(getY()+getHeight()-getWidth() < e.getY()) {
-			changeTextStart(30);
-		}
-		
-		return true;
-	}
-	
-	public void handleEvent(KeyEvent e) {
-		if(!active)
-			return;
-		
-		super.handleEvent(e);
-		
-		splitString();
-		
-		if(lstStrings.size()*15+6 > getHeight())
-			getScrollBar().setSize(getScrollBar().getMaxSize()*getHeight()/(lstStrings.size()*15+6));
-		else
-			getScrollBar().setSize(getScrollBar().getMaxSize());
-	
-		getScrollBar().setPosition(getScrollBar().getMaxSize()-getScrollBar().getSize());
-	}
-	
-	private void changeTextStart(int increment) {
-		setTextStart(getTextStart()+increment);
-		
-		if(lstStrings.size()*15+6>getHeight() && getTextStart() >= lstStrings.size()*15+6-getHeight()) {
-			setTextStart(lstStrings.size()*15+6-getHeight());
-			getScrollBar().setPosition(getScrollBar().getMaxSize()-getScrollBar().getSize());
-		}else if(getTextStart() < 0 || lstStrings.size()*15+6<=getHeight()) {
-			setTextStart(0);
-			getScrollBar().setPosition(0);
-		}else
-			getScrollBar().setPosition(getTextStart()*getScrollBar().getMaxSize()/(lstStrings.size()*15+6));
-	}
+  ArrayList<String> lstStrings;
+  FontMetrics metrics;
+  boolean active;
 
-	private void splitString() {
-		String drawnString = getText();
-		
-		ArrayList<String> lstTemp = new ArrayList<String>();
-        do {
-        	int x = 0;
-        	while(x<drawnString.length() && metrics.stringWidth(drawnString.substring(0, x+1))<=getWidth()-10 && !drawnString.substring(x, x+1).equals("\n")) {
-        		x++;
-        	}
-        	
-        	lstTemp.add(drawnString.substring(0, x));
-        	
-        	if(drawnString.length()>x && drawnString.substring(x, x+1).equals("\n"))
-        		drawnString = drawnString.substring(x+1);
-        	else
-        		drawnString = drawnString.substring(x);
-        }while(metrics.stringWidth(drawnString)>0);
-		
-        if(lstTemp.size()*15-getHeight()+6 > 0)
-    		setTextStart(lstTemp.size()*15-getHeight()+6);
-    	else
-    		setTextStart(0);
-        
-        lstStrings = lstTemp;
-	}
-	
-	public void draw(Graphics g) {
-		GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        GraphicsDevice device = env.getDefaultScreenDevice();
-        GraphicsConfiguration gc = device.getDefaultConfiguration();
-        
-        BufferedImage source = gc.createCompatibleImage(getWidth(), getHeight());
-        Graphics2D srcGraphics = source.createGraphics();
-        
-        if(isSelected() && System.currentTimeMillis() - getLastCursorChange() > getBlinkInterval())
-		{
-			if(getCursorState() == 0)
-				setCursorState(1);
-			else
-				setCursorState(0);
-			
-			setLastCursorChange(System.currentTimeMillis());
-		}
-        
-        srcGraphics.setColor(Color.green);
-		srcGraphics.setFont(getFont());
-        
-        int x;
-        for(x=0; x<lstStrings.size(); x++)
-        	srcGraphics.drawString(lstStrings.get(x), 5, metrics.getHeight()+x*15-getTextStart());
+  public MultiTextbox(String newName, int newX, int newY, int newWidth, int newHeight, String newLabel, boolean isActive, Font newFont, FontMetrics newMetrics) {
+    super(newName, newX, newY, newWidth, newHeight, newLabel, newFont, false);
+    this.lstStrings = new ArrayList<String>();
+    this.metrics = newMetrics;
+    this.active = isActive;
+    splitString();
+  }
 
-        x--;
-        if(isSelected() && getCursorState() == 1)
-			srcGraphics.drawLine(metrics.stringWidth(lstStrings.get(x))+6, 5+x*15-getTextStart(), metrics.stringWidth(lstStrings.get(x))+6, metrics.getHeight()+x*15-getTextStart());
-        
-		g.setColor(Color.green);
-		g.setFont(getFont());
-		
-		g.drawImage(source, getX(), getY(), null);
-		g.drawString(getLabel(), getX() - metrics.stringWidth(getLabel()) - 10, getY() + (getHeight() + metrics.getHeight())/2 - 2);
-		
-		g.setColor(Color.red);
-		g.drawRect(getX(), getY(), getWidth(), getHeight());
-		
-		getScrollBar().draw(g);
-	}
+  public void append(String str) {
+    if (getText().equals("")) {
+      setText(str);
+    } else {
+      setText(String.valueOf(getText()) + "\n" + str);
+    } 
+    splitString();
+    if (this.lstStrings.size() * 15 + 6 > getHeight()) {
+      getScrollBar().setSize(getScrollBar().getMaxSize() * getHeight() / (this.lstStrings.size() * 15 + 6));
+    } else {
+      getScrollBar().setSize(getScrollBar().getMaxSize());
+    }
+    getScrollBar().setPosition(getScrollBar().getMaxSize() - getScrollBar().getSize());
+  }
+
+  public void setText(String s) {
+    super.setText(s);
+    splitString();
+  }
+
+  public void clear() {
+    super.clear();
+    this.lstStrings = new ArrayList<String>();
+  }
+
+  public boolean handleEvent(MouseEvent e) {
+    if (!getScrollBar().handleEvent(e)) {
+      return false;
+    }
+    if (e.getY() < getY() + getWidth()) {
+      changeTextStart(-30);
+    } else if (getY() + getHeight() - getWidth() < e.getY()) {
+      changeTextStart(30);
+    }
+    return true;
+  }
+
+  public void handleEvent(KeyEvent e) {
+    if (!this.active) {
+      return;
+    }
+    super.handleEvent(e);
+    splitString();
+    if (this.lstStrings.size() * 15 + 6 > getHeight()) {
+      getScrollBar().setSize(getScrollBar().getMaxSize() * getHeight() / (this.lstStrings.size() * 15 + 6));
+    } else {
+      getScrollBar().setSize(getScrollBar().getMaxSize());
+    }
+    getScrollBar().setPosition(getScrollBar().getMaxSize() - getScrollBar().getSize());
+  }
+
+  private void changeTextStart(int increment) {
+    setTextStart(getTextStart() + increment);
+    if (this.lstStrings.size() * 15 + 6 > getHeight() && getTextStart() >= this.lstStrings.size() * 15 + 6 - getHeight()) {
+      setTextStart(this.lstStrings.size() * 15 + 6 - getHeight());
+      getScrollBar().setPosition(getScrollBar().getMaxSize() - getScrollBar().getSize());
+    } else if (getTextStart() < 0 || this.lstStrings.size() * 15 + 6 <= getHeight()) {
+      setTextStart(0);
+      getScrollBar().setPosition(0);
+    } else {
+      getScrollBar().setPosition(getTextStart() * getScrollBar().getMaxSize() / (this.lstStrings.size() * 15 + 6));
+    }
+  }
+
+  private void splitString() {
+    String drawnString = getText();
+    ArrayList<String> lstTemp = new ArrayList<String>();
+    do {
+      int x = 0, lastSpace = -1;
+      while (x < drawnString.length() && this.metrics.stringWidth(drawnString.substring(0, x + 1)) <= getWidth() - 10 && !drawnString.substring(x, x + 1).equals("\n")) {
+        if (drawnString.charAt(x) == ' ') {
+          lastSpace = x;
+        }
+        x++;
+      }
+      int xReal = x;
+      if (lastSpace > 0 && drawnString.length() > x) {
+        x = lastSpace + 1;
+      }
+      if (drawnString.length() > xReal && drawnString.substring(xReal, xReal + 1).equals("\n")) {
+        lstTemp.add(drawnString.substring(0, xReal));
+        drawnString = drawnString.substring(xReal + 1);
+      } else {
+        lstTemp.add(drawnString.substring(0, x));
+        drawnString = drawnString.substring(x);
+      }
+    } while (this.metrics.stringWidth(drawnString) > 0);
+    if (lstTemp.size() * 15 - getHeight() + 6 > 0) {
+      setTextStart(lstTemp.size() * 15 - getHeight() + 6);
+    } else {
+      setTextStart(0);
+    }
+    this.lstStrings = lstTemp;
+  }
+
+  public void draw(Graphics g) {
+    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
+    GraphicsDevice device = env.getDefaultScreenDevice();
+    GraphicsConfiguration gc = device.getDefaultConfiguration();
+    BufferedImage source = gc.createCompatibleImage(getWidth(), getHeight());
+    Graphics2D srcGraphics = source.createGraphics();
+    if (isSelected() && System.currentTimeMillis() - getLastCursorChange() > getBlinkInterval()) {
+      if (getCursorState() == 0) {
+        setCursorState(1);
+      } else {
+        setCursorState(0);
+      }
+      setLastCursorChange(System.currentTimeMillis());
+    }
+    srcGraphics.setColor(Color.green);
+    srcGraphics.setFont(getFont());
+    int x;
+    for (x = 0; x < this.lstStrings.size(); x++) {
+      srcGraphics.drawString(this.lstStrings.get(x), 5, this.metrics.getHeight() + x * 15 - getTextStart());
+    }
+    x--;
+    if (isSelected() && getCursorState() == 1) {
+      srcGraphics.drawLine(this.metrics.stringWidth(this.lstStrings.get(x)) + 6, 5 + x * 15 - getTextStart(), this.metrics.stringWidth(this.lstStrings.get(x)) + 6, this.metrics.getHeight() + x * 15 - getTextStart());
+    }
+    g.setColor(Color.green);
+    g.setFont(getFont());
+    g.drawImage(source, getX(), getY(), null);
+    g.drawString(getLabel(), getX() - this.metrics.stringWidth(getLabel()) - 10, getY() + (getHeight() + this.metrics.getHeight()) / 2 - 2);
+    g.setColor(Color.red);
+    if (!this.noBorder) {
+      g.drawRect(getX(), getY(), getWidth(), getHeight());
+    }
+    if (getScrollBar() != null) {
+      getScrollBar().draw(g);
+    }
+  }
 }
Index: gamegui/ProgressBar.java
===================================================================
--- gamegui/ProgressBar.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/ProgressBar.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -5,38 +5,37 @@
 
 public class ProgressBar extends Member {
-	private int max;
-	private int current;
-	
-	public ProgressBar(String newName, int newX, int newY, int newWidth, int newHeight) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		max = 1;
-		current = 0;
-	}
-	
-	public int getMax() {
-		return max;
-	}
-	
-	public int getCurrent() {
-		return current;
-	}
-	
-	public void setMax(int max) {
-		this.max = max;
-	}
-	
-	public void setCurrent(int current) {
-		this.current = current;
-	}
-	
-	public void draw(Graphics g) {
-		g.setColor(Color.black);
-    	g.fillRect(getX(), getY(), getWidth(), getHeight());
-    	
-    	g.setColor(Color.blue);
-		g.fillRect(getX(), getY(), getWidth()*current/max, getHeight());
-		g.setColor(Color.red);
-		g.drawRect(getX(), getY(), getWidth(), getHeight());
-	}
+
+  private int max;
+  private int current;
+
+  public ProgressBar(String newName, int newX, int newY, int newWidth, int newHeight) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.max = 1;
+    this.current = 0;
+  }
+
+  public int getMax() {
+    return this.max;
+  }
+
+  public int getCurrent() {
+    return this.current;
+  }
+
+  public void setMax(int max) {
+    this.max = max;
+  }
+
+  public void setCurrent(int current) {
+    this.current = current;
+  }
+
+  public void draw(Graphics g) {
+    g.setColor(Color.black);
+    g.fillRect(getX(), getY(), getWidth(), getHeight());
+    g.setColor(Color.blue);
+    g.fillRect(getX(), getY(), getWidth() * this.current / this.max, getHeight());
+    g.setColor(Color.red);
+    g.drawRect(getX(), getY(), getWidth(), getHeight());
+  }
 }
Index: gamegui/RadioButton.java
===================================================================
--- gamegui/RadioButton.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/RadioButton.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -1,68 +1,59 @@
 package gamegui;
 
-import java.awt.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
 
-public class RadioButton extends Member
-{
-	private String text;
-	private Font font;
-	private boolean textAfter;
-	private boolean selected;
-	
-	public RadioButton(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont, boolean isTextAfter)
-	{
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		text = newText;
-		font = newFont;
-		textAfter = isTextAfter;
-	}
-	
-	public void draw(Graphics g)
-	{
-		FontMetrics metrics = g.getFontMetrics(font);
-		
-		g.setColor(Color.red);
-		g.drawOval(getX(), getY(), getWidth(), getHeight());
-		
-		if(selected)
-		{
-			g.setColor(Color.green);
-			g.fillOval(getX() + 5, getY() + 5, getWidth() - 10, getHeight() - 10);
-		}
-		
-		g.setColor(Color.green);
-		g.setFont(font);
-		
-		if(textAfter)
-			g.drawString(text, getX() + getWidth() + 7, getY() + (getHeight() + metrics.getHeight())/2 - 2);
-		else
-			g.drawString(text, getX() - metrics.stringWidth(text) - 7, getY() + (getHeight() + metrics.getHeight())/2 - 2);
-	}
-	
-	public void clear()
-	{	
-		selected = false;
-	}
-	
-	public String getLabel() {
-		return text;
-	}
-	
-	public boolean isClicked(int xCoord, int yCoord)
-	{
-		double distance = Math.sqrt(Math.pow(getX() + getWidth()/2 - xCoord, 2) + Math.pow(getY() +getHeight()/2 - yCoord, 2));
-		
-		return !(distance > getWidth() / 2);
-	}
-	
-	public boolean isSelected()
-	{
-		return selected;
-	}
-	
-	public void setSelected(boolean isSelected)
-	{
-		selected = isSelected;
-	}
+public class RadioButton extends Member {
+
+  private String text;
+  private Font font;
+  private boolean textAfter;
+  private boolean selected;
+
+  public RadioButton(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont, boolean isTextAfter) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.text = newText;
+    this.font = newFont;
+    this.textAfter = isTextAfter;
+  }
+
+  public void draw(Graphics g) {
+    FontMetrics metrics = g.getFontMetrics(this.font);
+    g.setColor(Color.red);
+    g.drawOval(getX(), getY(), getWidth(), getHeight());
+    if (this.selected) {
+      g.setColor(Color.green);
+      g.fillOval(getX() + 5, getY() + 5, getWidth() - 10, getHeight() - 10);
+    }
+    g.setColor(Color.green);
+    g.setFont(this.font);
+    if (this.textAfter) {
+      g.drawString(this.text, getX() + getWidth() + 7, getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+    } else {
+      g.drawString(this.text, getX() - metrics.stringWidth(this.text) - 7, getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+    }
+  }
+
+  public void clear() {
+    this.selected = false;
+  }
+
+  public String getLabel() {
+    return this.text;
+  }
+
+  public boolean isClicked(int xCoord, int yCoord) {
+    double distance = Math.sqrt(Math.pow((getX() + getWidth() / 2 - xCoord), 2.0D) + Math.pow((getY() + getHeight() / 2 - yCoord), 2.0D));
+    return !(distance > (getWidth() / 2));
+  }
+
+  public boolean isSelected() {
+    return this.selected;
+  }
+
+  public void setSelected(boolean isSelected) {
+    this.selected = isSelected;
+  }
 }
Index: gamegui/RadioGroup.java
===================================================================
--- gamegui/RadioGroup.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/RadioGroup.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -1,83 +1,80 @@
 package gamegui;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
 
+public class RadioGroup extends Member {
 
-public class RadioGroup extends Member
-{
-	private ArrayList<RadioButton> buttons;
-	private RadioButton selected;
-	private String text;
-	private Font font;
-	
-	public RadioGroup(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		buttons = new ArrayList<RadioButton>();
-		selected = null;
-		text = newText;
-		font = newFont;
-	}
-	
-	public boolean handleEvent(MouseEvent e) {
-		if(selected != null)
-			selected.clear();
-		
-		for(int x=0; x < buttons.size(); x++)
-			if(((RadioButton)buttons.get(x)).isClicked(e.getX(), e.getY())) {
-				selected = buttons.get(x);
-				selected.setSelected(true);
-				return true;
-			}
-		
-		return false;
-	}
-	
-	public void draw(Graphics g)
-	{
-		FontMetrics metrics = g.getFontMetrics(font);
-		
-		g.setColor(Color.green);
-		g.setFont(font);
-		
-		g.drawString(text, getX() - metrics.stringWidth(text) - 10, getY() + (getHeight() + metrics.getHeight())/2 - 2);
-		
-    	for(int x=0; x < buttons.size(); x++)
-    		((RadioButton)(buttons.get(x))).draw(g);
-	}
-	
-	public void clear()
-	{	
-		for(int x=0; x < buttons.size(); x++)
-    		((RadioButton)(buttons.get(x))).clear();
-	}
-	
-	public void add(RadioButton aButton) {
-		buttons.add(aButton);
-	}
-	
-	public RadioButton getButton(String aName) {
-		for(int x=0; x < buttons.size(); x++)
-    		if(buttons.get(x).getName().equals(aName))
-    			return (RadioButton)buttons.get(x);
-		
-		return null;
-	}
-	
-	public String getSelected() {
-		if(selected != null)
-			return selected.getName();
-		else
-			return "None";
-	}
-	
-	public void setSelected(String button) {
-		clear();
-		
-		for(int x=0; x < buttons.size(); x++)
-    		if(buttons.get(x).getName().equals(button))
-    			buttons.get(x).setSelected(true);
-	}
+  private ArrayList<RadioButton> buttons;
+  private RadioButton selected;
+  private String text;
+  private Font font;
+
+  public RadioGroup(String newName, int newX, int newY, int newWidth, int newHeight, String newText, Font newFont) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.buttons = new ArrayList<RadioButton>();
+    this.selected = null;
+    this.text = newText;
+    this.font = newFont;
+  }
+
+  public boolean handleEvent(MouseEvent e) {
+    if (this.selected != null)
+      this.selected.clear(); 
+    for (int x = 0; x < this.buttons.size(); x++) {
+      if (((RadioButton)this.buttons.get(x)).isClicked(e.getX(), e.getY())) {
+        this.selected = this.buttons.get(x);
+        this.selected.setSelected(true);
+        return true;
+      }
+    }
+    return false;
+  }
+
+  public void draw(Graphics g) {
+    FontMetrics metrics = g.getFontMetrics(this.font);
+    g.setColor(Color.green);
+    g.setFont(this.font);
+    g.drawString(this.text, getX() - metrics.stringWidth(this.text) - 10, getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+    for (int x = 0; x < this.buttons.size(); x++) {
+      ((RadioButton)this.buttons.get(x)).draw(g);
+    }
+  }
+
+  public void clear() {
+    for (int x = 0; x < this.buttons.size(); x++) {}
+      ((RadioButton)this.buttons.get(x)).clear();
+    }
+  }
+
+  public void add(RadioButton aButton) {
+    this.buttons.add(aButton);
+  }
+
+  public RadioButton getButton(String aName) {
+    for (int x = 0; x < this.buttons.size(); x++) {
+      if (((RadioButton)this.buttons.get(x)).getName().equals(aName))
+        return this.buttons.get(x); 
+    }
+    return null;
+  }
+
+  public String getSelected() {
+    if (this.selected != null) {
+      return this.selected.getName();
+    }
+    return "None";
+  }
+
+  public void setSelected(String button) {
+    clear();
+    for (int x = 0; x < this.buttons.size(); x++) {
+      if (((RadioButton)this.buttons.get(x)).getName().equals(button))
+        ((RadioButton)this.buttons.get(x)).setSelected(true); 
+    }
+  }
 }
Index: gamegui/ScrollBar.java
===================================================================
--- gamegui/ScrollBar.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/ScrollBar.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -2,75 +2,70 @@
 
 import java.awt.*;
-import java.awt.event.*;
+import java.awt.event.MouseEvent;
 
 public class ScrollBar extends Member {
-	int size;
-	int position;
-	int scrollSpeed;
-	
-	public ScrollBar(String newName, int newX, int newY, int newWidth, int newHeight, int newScrollSpeed) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		size = 0;
-		position = 0;
-		scrollSpeed = newScrollSpeed;
-	}
-	
-	public void clear() {
-		size = 0;
-		position = 0;
-	}
-	
-	public boolean handleEvent(MouseEvent e) {
-		if(!(getX() < e.getX() && e.getX() < getX()+getWidth() && getY() < e.getY() && e.getY() < getY()+getHeight()))
-			return false;
-		else
-			return true;
-	}
-	
-	public void draw(Graphics g) {
-		g.setColor(Color.black);
-    	g.fillRect(getX(), getY(), getWidth(), getHeight());
-    	
-    	g.setColor(Color.red);
-		g.drawRect(getX(), getY(), getWidth(), getHeight());
-		
-		g.drawLine(getX(), getY()+getWidth(), getX()+getWidth(), getY()+getWidth());
-		g.drawLine(getX(), getY()+getHeight()-getWidth(), getX()+getWidth(), getY()+getHeight()-getWidth());
-    	
-		g.drawLine(getX(), getY()+getWidth()+position, getX()+getWidth(), getY()+getWidth()+position);
-		g.drawLine(getX(), getY()+getWidth()+position+size, getX()+getWidth(), getY()+getWidth()+position+size);
-		
-		g.drawLine(getX()+getWidth()*3/20, getY()+getWidth()*17/20, getX()+getWidth()*17/20, getY()+getWidth()*17/20);
-		g.drawLine(getX()+getWidth()*17/20, getY()+getWidth()*17/20, getX()+getWidth()/2, getY()+getWidth()*3/20);
-		g.drawLine(getX()+getWidth()/2, getY()+getWidth()*3/20, getX()+getWidth()*3/20, getY()+getWidth()*17/20);
-		
-		g.drawLine(getX()+getWidth()*3/20, getY()+getHeight()-getWidth()*17/20, getX()+getWidth()*17/20, getY()+getHeight()-getWidth()*17/20);
-		g.drawLine(getX()+getWidth()*17/20, getY()+getHeight()-getWidth()*17/20, getX()+getWidth()/2, getY()+getHeight()-getWidth()*3/20);
-		g.drawLine(getX()+getWidth()/2, getY()+getHeight()-getWidth()*3/20, getX()+getWidth()*3/20, getY()+getHeight()-getWidth()*17/20);
-	}
 
-	public int getPosition() {
-		return position;
-	}
+  int size;
+  int position;
+  int scrollSpeed;
 
-	public int getScrollSpeed() {
-		return scrollSpeed;
-	}
+  public ScrollBar(String newName, int newX, int newY, int newWidth, int newHeight, int newScrollSpeed) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.size = 0;
+    this.position = 0;
+    this.scrollSpeed = newScrollSpeed;
+  }
 
-	public int getSize() {
-		return size;
-	}
-	
-	public int getMaxSize() {
-		return getHeight()-2*getWidth();
-	}
+  public void clear() {
+    this.size = 0;
+    this.position = 0;
+  }
 
-	public void setPosition(int position) {
-		this.position = position;
-	}
-	
-	public void setSize(int size) {
-		this.size = size;
-	}
+  public boolean handleEvent(MouseEvent e) {
+    if (getX() >= e.getX() || e.getX() >= getX() + getWidth() || getY() >= e.getY() || e.getY() >= getY() + getHeight()) {
+      return false;
+    }
+    return true;
+  }
+
+  public void draw(Graphics g) {
+    g.setColor(Color.black);
+    g.fillRect(getX(), getY(), getWidth(), getHeight());
+    g.setColor(Color.red);
+    g.drawRect(getX(), getY(), getWidth(), getHeight());
+    g.drawLine(getX(), getY() + getWidth(), getX() + getWidth(), getY() + getWidth());
+    g.drawLine(getX(), getY() + getHeight() - getWidth(), getX() + getWidth(), getY() + getHeight() - getWidth());
+    g.drawLine(getX(), getY() + getWidth() + this.position, getX() + getWidth(), getY() + getWidth() + this.position);
+    g.drawLine(getX(), getY() + getWidth() + this.position + this.size, getX() + getWidth(), getY() + getWidth() + this.position + this.size);
+    g.drawLine(getX() + getWidth() * 3 / 20, getY() + getWidth() * 17 / 20, getX() + getWidth() * 17 / 20, getY() + getWidth() * 17 / 20);
+    g.drawLine(getX() + getWidth() * 17 / 20, getY() + getWidth() * 17 / 20, getX() + getWidth() / 2, getY() + getWidth() * 3 / 20);
+    g.drawLine(getX() + getWidth() / 2, getY() + getWidth() * 3 / 20, getX() + getWidth() * 3 / 20, getY() + getWidth() * 17 / 20);
+    g.drawLine(getX() + getWidth() * 3 / 20, getY() + getHeight() - getWidth() * 17 / 20, getX() + getWidth() * 17 / 20, getY() + getHeight() - getWidth() * 17 / 20);
+    g.drawLine(getX() + getWidth() * 17 / 20, getY() + getHeight() - getWidth() * 17 / 20, getX() + getWidth() / 2, getY() + getHeight() - getWidth() * 3 / 20);
+    g.drawLine(getX() + getWidth() / 2, getY() + getHeight() - getWidth() * 3 / 20, getX() + getWidth() * 3 / 20, getY() + getHeight() - getWidth() * 17 / 20);
+  }
+
+  public int getPosition() {
+    return this.position;
+  }
+
+  public int getScrollSpeed() {
+    return this.scrollSpeed;
+  }
+
+  public int getSize() {
+    return this.size;
+  }
+
+  public int getMaxSize() {
+    return getHeight() - 2 * getWidth();
+  }
+
+  public void setPosition(int position) {
+    this.position = position;
+  }
+
+  public void setSize(int size) {
+    this.size = size;
+  }
 }
Index: gamegui/ScrollList.java
===================================================================
--- gamegui/ScrollList.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/ScrollList.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -2,120 +2,123 @@
 
 import java.awt.*;
-import java.awt.event.*;
+import java.awt.event.MouseEvent;
 import java.awt.image.BufferedImage;
-import java.util.*;
+import java.util.ArrayList;
 
 public class ScrollList extends Member {
-	private ArrayList<Listable> lstObjects;
-	private Listable selectedItem;
-	private Font font;
-	private FontMetrics metrics;
-	private int textStart;
-	private boolean change;
-	
-	public ScrollList(String newName, int newX, int newY, int newWidth, int newHeight, Font font, FontMetrics metrics) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		lstObjects = new ArrayList<Listable>();
-		selectedItem = null;
-		this.font = font;
-		this.metrics = metrics;
-		textStart = 0;
-		change = false;
-	}
-	
-	public ArrayList<Listable> getList() {
-		return lstObjects;
-	}
-	
-	public Listable getSelected() {
-		return selectedItem;
-	}
-	
-	public boolean isChanged() {
-		return change;
-	}
-	
-	public void changeHandled() {
-		change = false;
-	}
-	
-	public void deselect() {
-		selectedItem = null;
-	}
-	
-	public void clear() {
-		lstObjects = new ArrayList<Listable>();
-		selectedItem = null;
-		textStart = 0;
-		changeHandled();
-	}
-	
-	public boolean handleEvent(MouseEvent e) {
-		if(getX() < e.getX() && e.getX() < getX()+getWidth()) {
-			if(getY() < e.getY() && getY()-textStart+2 < e.getY() && e.getY() < getY()+getHeight() && e.getY() < getY()+lstObjects.size()*15-textStart+2) {
-				selectedItem = lstObjects.get((e.getY()-getY()+textStart-2)/15);
-				change = true;
-				return true;
-			}
-		}
-		
-		if(!getScrollBar().handleEvent(e))
-			return false;
-		
-		if(e.getY() < getY()+getScrollBar().getWidth()) {
-			changeTextStart(-30);
-		}else if(getY()+getHeight()-getScrollBar().getWidth() < e.getY()) {
-			changeTextStart(30);
-		}
-		
-		return true;
-	}
-	
-	private void changeTextStart(int increment) {
-		textStart += increment;
-		
-		if(lstObjects.size()*15+6>getHeight() && textStart >= lstObjects.size()*15+6-getHeight()) {
-			textStart = lstObjects.size()*15+6-getHeight();
-			getScrollBar().setPosition(getScrollBar().getMaxSize()-getScrollBar().getSize());
-		}else if(textStart < 0 || lstObjects.size()*15+6<=getHeight()) {
-			textStart = 0;
-			getScrollBar().setPosition(0);
-		}else
-			getScrollBar().setPosition(textStart*getScrollBar().getMaxSize()/(lstObjects.size()*15+6));
-	}
-	
-	public void draw(Graphics g) {
-		GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        GraphicsDevice device = env.getDefaultScreenDevice();
-        GraphicsConfiguration gc = device.getDefaultConfiguration();
-        
-        BufferedImage source = gc.createCompatibleImage(getWidth(), getHeight());
-        Graphics2D srcGraphics = source.createGraphics();
-        
-        srcGraphics.setColor(Color.green);
-		srcGraphics.setFont(font);
-		
-        for(int x=0; x<lstObjects.size(); x++) {
-        	if(selectedItem != null && selectedItem.equals(lstObjects.get(x))) {
-        		srcGraphics.setColor(Color.blue);
-        		srcGraphics.fillRect(0, x*15-textStart+3, getWidth(), 15);
-        		srcGraphics.setColor(Color.green);
-        	}
-        	
-        	lstObjects.get(x).drawListString(5, metrics.getHeight()+x*15-textStart, srcGraphics);
-        }
-        	
-		g.drawImage(source, getX(), getY(), null);
-		
-		g.setColor(Color.red);
-		g.drawRect(getX(), getY(), getWidth(), getHeight());
-		
-		if(lstObjects.size()*15+6 > getHeight())
-			getScrollBar().setSize(getScrollBar().getMaxSize()*getHeight()/(lstObjects.size()*15+6));
-		else
-			getScrollBar().setSize(getScrollBar().getMaxSize());
-		
-		getScrollBar().draw(g);
-	}
+
+  private ArrayList<Listable> lstObjects;
+  private Listable selectedItem;
+  private Font font;
+  private int fontHeight;
+  private int textStart;
+  private boolean change;
+  
+  public ScrollList(String newName, int newX, int newY, int newWidth, int newHeight, Font font, FontMetrics metrics) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.lstObjects = new ArrayList<Listable>();
+    this.selectedItem = null;
+    this.font = font;
+    if (metrics == null) {
+      this.fontHeight = 0;
+    } else {
+      this.fontHeight = metrics.getHeight();
+    }
+    this.textStart = 0;
+    this.change = false;
+  }
+
+  public ArrayList<Listable> getList() {
+    return this.lstObjects;
+  }
+
+  public Listable getSelected() {
+    return this.selectedItem;
+  }
+
+  public boolean isChanged() {
+    return this.change;
+  }
+
+  public void changeHandled() {
+    this.change = false;
+  }
+
+  public void deselect() {
+    this.selectedItem = null;
+  }
+
+  public void clear() {
+    this.lstObjects.clear();
+    this.selectedItem = null;
+    this.textStart = 0;
+    changeHandled();
+  }
+
+  public boolean handleEvent(MouseEvent e) {
+    if (!getScrollBar().handleEvent(e))
+      return false; 
+    if (e.getY() < getY() + getScrollBar().getWidth()) {
+      changeTextStart(-30);
+    } else if (getY() + getHeight() - getScrollBar().getWidth() < e.getY()) {
+      changeTextStart(30);
+    }
+    return true;
+  }
+
+  private void changeTextStart(int increment) {
+    this.textStart += increment;
+    int listHeight = 0;
+    if (this.lstObjects.size() > 0) {
+      Listable e = this.lstObjects.get(0);
+      listHeight = e.getHeight() * (int)Math.ceil(this.lstObjects.size() / (getWidth() / e.getWidth())) + e.getYOffset();
+    }
+    if (listHeight > getHeight() && this.textStart >= listHeight - getHeight()) {
+      this.textStart = listHeight - getHeight();
+      getScrollBar().setPosition(getScrollBar().getMaxSize() - getScrollBar().getSize());
+    } else if (this.textStart < 0 || listHeight <= getHeight()) {
+      this.textStart = 0;
+      getScrollBar().setPosition(0);
+    } else {
+      getScrollBar().setPosition(this.textStart * getScrollBar().getMaxSize() / listHeight);
+    }
+  }
+
+  public int getTextStart() {
+    return this.textStart;
+  }
+
+  public void draw(Graphics g) {
+    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
+    GraphicsDevice device = env.getDefaultScreenDevice();
+    GraphicsConfiguration gc = device.getDefaultConfiguration();
+    BufferedImage source = gc.createCompatibleImage(getWidth(), getHeight());
+    Graphics2D srcGraphics = source.createGraphics();
+    srcGraphics.setColor(Color.green);
+    if (this.font != null) {
+      srcGraphics.setFont(this.font);
+    }
+    int listHeight = 0;
+    Listable e = null;
+    if (this.lstObjects.size() > 0) {
+      e = this.lstObjects.get(0);
+      listHeight = e.getHeight() * (int)Math.ceil(this.lstObjects.size() / (getWidth() / e.getWidth())) + e.getYOffset();
+    }
+    int numPerRow = 0;
+    if (e != null) {
+      numPerRow = getWidth() / e.getWidth();
+    }
+    for (int x = 0; x < this.lstObjects.size(); x++) {
+      ((Listable)this.lstObjects.get(x)).draw(e.getHeight() * x % numPerRow + e.getXOffset(), this.fontHeight + x / numPerRow * e.getHeight() - this.textStart, srcGraphics);
+    }
+    g.drawImage(source, getX(), getY(), null);
+    g.setColor(Color.red);
+    g.drawRect(getX(), getY(), getWidth(), getHeight());
+    if (listHeight > getHeight()) {
+      getScrollBar().setSize(getScrollBar().getMaxSize() * getHeight() / listHeight);
+    } else {
+      getScrollBar().setSize(getScrollBar().getMaxSize());
+    }
+    getScrollBar().draw(g);
+  }
 }
Index: gamegui/TabbedWindow.java
===================================================================
--- gamegui/TabbedWindow.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/TabbedWindow.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -1,100 +1,99 @@
 package gamegui;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
 
 public class TabbedWindow extends Member {
-	private ArrayList<Window> windows;
-	private ArrayList<String> windowLabels;
-	private Window activeWindow;
-	private int tabHeight;
-	private Font tabFont;
-	
-	public TabbedWindow(String newName, int newX, int newY, int newWidth, int newHeight, int newTabHeight, Font newFont) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		windows = new ArrayList<Window>();
-		windowLabels = new ArrayList<String>();
-		tabHeight = newTabHeight;
-		activeWindow = null;
-		tabFont = newFont;
-	}
-	
-	public void add(Window newWindow, String name) {
-		newWindow.offset(getX(), getY()+tabHeight);
-		
-		if(activeWindow == null)
-			activeWindow = newWindow;
-		windows.add(newWindow);
-		windowLabels.add(name);
-	}
-	
-	public void clear() {
-		activeWindow = windows.get(0);
-		for(int x=0; x < windows.size(); x++)
-    		windows.get(x).clear();
-	}
-	
-	public void offset(int xOffset, int yOffset) {
-		super.offset(xOffset, yOffset);
-		
-		for(int x=0; x < windows.size(); x++)
-    		windows.get(x).offset(xOffset, yOffset);
-	}
-	
-	public Window getWindow(String aName) {
-		for(int x=0; x < windows.size(); x++)
-    		if(windows.get(x).getName().equals(aName))
-    			return (Window)windows.get(x);
-		
-		return null;
-	}
-	
-	public boolean handleEvent(MouseEvent e) {
-		for(int x=0; x < windows.size(); x++) {
-    		if(isClicked(getX() + x*getWidth()/windows.size(), getY(), getWidth()/windows.size(), tabHeight, e.getX(), e.getY())) {
-    			activeWindow = windows.get(x);
-    			return true;
-			}
-		}
-    			
-		return activeWindow.handleEvent(e);
-	}
-	
-	private boolean isClicked(int x, int y, int width, int height, int mouseX, int mouseY) {
-		return x <= mouseX && mouseX <= x+width && y <= mouseY && mouseY <= y+height;
-	}
-	
-	public void draw(Graphics g) {
-		FontMetrics metrics = g.getFontMetrics(tabFont);
-		
-		g.setColor(Color.black);
-    	g.fillRect(getX(), getY(), getWidth(), getHeight());
-    	
-		g.setFont(tabFont);
-    	for(int x=0; x < windows.size(); x++)
-    	{
-    		g.setColor(Color.green);
-    		g.drawString(windowLabels.get(x), getX()+x*getWidth()/windows.size()+(getWidth()/windows.size()-metrics.stringWidth(windowLabels.get(x)))/2, getY() + (tabHeight + metrics.getHeight())/2 - 2);
-    		
-    		g.setColor(Color.red);
-			g.drawLine(getX()+x*getWidth()/windows.size(), getY(), getX()+x*getWidth()/windows.size(), getY()+tabHeight);
-			
-    		if(windows.get(x).equals(activeWindow)) {
-    			((Member)(windows.get(x))).draw(g);
-    			g.setColor(Color.red);
-    			g.drawRect(getX(), getY(), getWidth(), getHeight());
-    	    	g.drawLine(getX(), getY()+tabHeight, getX()+x*getWidth()/windows.size(), getY()+tabHeight);
-    	    	g.drawLine(getX()+(x+1)*getWidth()/windows.size(), getY()+tabHeight, getX()+getWidth(), getY()+tabHeight);
-    		}
-    	}
-	}
-	
-	public String getActive() {
-		if(activeWindow != null)
-			return activeWindow.getName();
-		else
-			return "";
-	}
+
+  private ArrayList<Window> windows;  
+  private ArrayList<String> windowLabels;
+  private Window activeWindow;
+  private int tabHeight;
+  private Font tabFont;
+
+  public TabbedWindow(String newName, int newX, int newY, int newWidth, int newHeight, int newTabHeight, Font newFont) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.windows = new ArrayList<Window>();
+    this.windowLabels = new ArrayList<String>();
+    this.tabHeight = newTabHeight;
+    this.activeWindow = null;
+    this.tabFont = newFont;
+  }
+
+  public void add(Window newWindow, String name) {
+    newWindow.offset(getX(), getY() + this.tabHeight);
+    if (this.activeWindow == null) {
+      this.activeWindow = newWindow;
+    }
+    this.windows.add(newWindow);
+    this.windowLabels.add(name);
+  }
+
+  public void clear() {
+    this.activeWindow = this.windows.get(0);
+    for (int x = 0; x < this.windows.size(); x++) {
+      ((Window)this.windows.get(x)).clear();
+    }
+  }
+
+  public void offset(int xOffset, int yOffset) {
+    super.offset(xOffset, yOffset);
+    for (int x = 0; x < this.windows.size(); x++) {
+      ((Window)this.windows.get(x)).offset(xOffset, yOffset);
+    }
+  }
+
+  public Window getWindow(String aName) {
+    for (int x = 0; x < this.windows.size(); x++) {
+      if (((Window)this.windows.get(x)).getName().equals(aName)) {
+        return this.windows.get(x);
+      }
+    }
+    return null;
+  }
+
+  public boolean handleEvent(MouseEvent e) {
+    for (int x = 0; x < this.windows.size(); x++) {
+      if (isClicked(getX() + x * getWidth() / this.windows.size(), getY(), getWidth() / this.windows.size(), this.tabHeight, e.getX(), e.getY())) {
+        this.activeWindow = this.windows.get(x);
+        return true;
+      }
+    }
+    return this.activeWindow.handleEvent(e);
+  }
+
+  private boolean isClicked(int x, int y, int width, int height, int mouseX, int mouseY) {
+    return (x <= mouseX && mouseX <= x + width && y <= mouseY && mouseY <= y + height);
+  }
+
+  public void draw(Graphics g) {
+    FontMetrics metrics = g.getFontMetrics(this.tabFont);
+    g.setColor(Color.black);
+    g.fillRect(getX(), getY(), getWidth(), getHeight());
+    g.setFont(this.tabFont);
+    for (int x = 0; x < this.windows.size(); x++) {
+      g.setColor(Color.green);
+      g.drawString(this.windowLabels.get(x), getX() + x * getWidth() / this.windows.size() + (getWidth() / this.windows.size() - metrics.stringWidth(this.windowLabels.get(x))) / 2, getY() + (this.tabHeight + metrics.getHeight()) / 2 - 2);
+      g.setColor(Color.red);
+      g.drawLine(getX() + x * getWidth() / this.windows.size(), getY(), getX() + x * getWidth() / this.windows.size(), getY() + this.tabHeight);
+      if (((Window)this.windows.get(x)).equals(this.activeWindow)) {
+        ((Member)this.windows.get(x)).draw(g);
+        g.setColor(Color.red);
+        g.drawRect(getX(), getY(), getWidth(), getHeight());
+        g.drawLine(getX(), getY() + this.tabHeight, getX() + x * getWidth() / this.windows.size(), getY() + this.tabHeight);
+        g.drawLine(getX() + (x + 1) * getWidth() / this.windows.size(), getY() + this.tabHeight, getX() + getWidth(), getY() + this.tabHeight);
+      }
+    }
+  }
+
+  public String getActive() {
+    if (this.activeWindow != null) {
+      return this.activeWindow.getName();
+    }
+    return "";
+  }
 }
Index: gamegui/Textbox.java
===================================================================
--- gamegui/Textbox.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Textbox.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -2,167 +2,163 @@
 
 import java.awt.*;
-import java.awt.image.*;
-import java.awt.event.*;
+import java.awt.event.KeyEvent;
+import java.awt.image.BufferedImage;
 
-public class Textbox extends Member
-{
-	private String label;
-	private String text;
-	private Font font;
-	private int textStart;
-	private boolean selected;
-	private int cursorState;
-	private int blinkInterval;
-	private long lastCursorChange;
-	private boolean password;
-	
-	public Textbox(String newName, int newX, int newY, int newWidth, int newHeight, String newLabel, Font newFont, boolean isPass) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		label = new String(newLabel);
-		text = new String();
-		font = newFont;
-		textStart = 0;
-		selected = false;
-		cursorState = 0;
-		blinkInterval = 1000/2;
-		password = isPass;
-	}
-	
-	public void handleEvent(KeyEvent e) {
-		if(32 <= e.getKeyCode() && e.getKeyCode() <= 127)
-		{
-			if(e.getKeyCode() == 127)
-			{
-				if(text.length() > 0)
-					text = text.substring(0, text.length() - 1);
-			}
-			else
-				text = text + Character.toString(e.getKeyChar());
+public class Textbox extends Member {
 
-		}
-		else if(e.getKeyCode() == 8)
-		{
-			if(text.length() > 0)
-				text = text.substring(0, text.length() - 1);
-		}
-	}
-	
-	public void draw(Graphics g) {
-		String drawnString = new String();
-		FontMetrics metrics = g.getFontMetrics(font);
-		
-		GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
-        GraphicsDevice device = env.getDefaultScreenDevice();
-        GraphicsConfiguration gc = device.getDefaultConfiguration();
-        
-        BufferedImage source = gc.createCompatibleImage(getWidth(), getHeight());
-        Graphics2D srcGraphics = source.createGraphics();
-        
-        if(selected && System.currentTimeMillis() - lastCursorChange > blinkInterval)
-		{
-			if(cursorState == 0)
-				cursorState = 1;
-			else
-				cursorState = 0;
-			
-			lastCursorChange = System.currentTimeMillis();
-		}
-		
-        if(password)
-        {
-        	for(int x=0;x<text.length();x++)
-				drawnString+="*";
+  private String label;  
+  private String text;
+  private Font font;
+  private int textStart;
+  private boolean selected;
+  private int cursorState;
+  private int blinkInterval;
+  private long lastCursorChange;
+  private boolean password;
+  protected boolean noBorder;
+
+  public Textbox(String newName, int newX, int newY, int newWidth, int newHeight, String newLabel, Font newFont, boolean isPass) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.label = new String(newLabel);
+    this.text = new String();
+    this.font = newFont;
+    this.textStart = 0;
+    this.selected = false;
+    this.cursorState = 0;
+    this.blinkInterval = 500;
+    this.password = isPass;
+    this.noBorder = false;
+  }
+
+  public void setBorder(boolean b) {
+    this.noBorder = !b;
+  }
+
+  public void handleEvent(KeyEvent e) {
+    if (32 <= e.getKeyCode() && e.getKeyCode() <= 127) {
+      if (e.getKeyCode() == 127) {
+        if (this.text.length() > 0) {
+          this.text = this.text.substring(0, this.text.length() - 1);
         }
-        else
-        	drawnString = text;
-        	
-    	if(metrics.stringWidth(drawnString) + 9 > getWidth())
-    		textStart = metrics.stringWidth(drawnString)+9-getWidth();
-    	else
-    		textStart = 0;
-    	
-    	g.setColor(Color.green);
-		g.setFont(font);
-		srcGraphics.setColor(Color.green);
-		srcGraphics.setFont(font);
+      } else {
+        this.text = String.valueOf(this.text) + Character.toString(e.getKeyChar());
+      }
+    } else if (e.getKeyCode() == 8) {
+      if (this.text.length() > 0) {
+        this.text = this.text.substring(0, this.text.length() - 1);
+      }
+    }
+  }
 
-		srcGraphics.drawString(drawnString, 5-textStart, (getHeight() + metrics.getHeight())/2 - 2);
-		
-		g.drawImage(source, getX(), getY(), null);
-		g.drawString(label, getX() - metrics.stringWidth(label) - 10, getY() + (getHeight() + metrics.getHeight())/2 - 2);
-		
-		if(selected && cursorState == 1)
-			g.drawLine(getX() + metrics.stringWidth(drawnString) - textStart + 6, getY() + 5, getX() + metrics.stringWidth(drawnString) - textStart + 6, getY() + getHeight() - 5);
-		
-		g.setColor(Color.red);
-		g.drawRect(getX(), getY(), getWidth(), getHeight());
-	}
-	
-	public boolean isClicked(int xCoord, int yCoord) {
-		if(xCoord < getX() || getX() + getWidth() < xCoord)
-			return false;
-		if(yCoord < getY() || getY() + getHeight() < yCoord)
-			return false;
-		
-			return true;
-	}
-	
-	public void clear() {
-		text = "";
-		textStart = 0;
-		selected = false;
-	}
+  public void draw(Graphics g) {
+    String drawnString = new String();
+    FontMetrics metrics = g.getFontMetrics(this.font);
+    GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
+    GraphicsDevice device = env.getDefaultScreenDevice();
+    GraphicsConfiguration gc = device.getDefaultConfiguration();
+    BufferedImage source = gc.createCompatibleImage(getWidth(), getHeight());
+    Graphics2D srcGraphics = source.createGraphics();
+    if (this.selected && System.currentTimeMillis() - this.lastCursorChange > this.blinkInterval) {
+      if (this.cursorState == 0) {
+        this.cursorState = 1;
+      } else {
+        this.cursorState = 0;
+      }
+      this.lastCursorChange = System.currentTimeMillis();
+    }
+    if (this.password) {
+      for (int x = 0; x < this.text.length(); x++) {
+        drawnString = String.valueOf(drawnString) + "*";
+      }
+    } else {
+      drawnString = this.text;
+    }
+    if (metrics.stringWidth(drawnString) + 9 > getWidth()) {
+      this.textStart = metrics.stringWidth(drawnString) + 9 - getWidth();
+    } else {
+      this.textStart = 0;
+    }
+    g.setColor(Color.green);
+    g.setFont(this.font);
+    srcGraphics.setColor(Color.green);
+    srcGraphics.setFont(this.font);
+    srcGraphics.drawString(drawnString, 5 - this.textStart, (getHeight() + metrics.getHeight()) / 2 - 2);
+    g.drawImage(source, getX(), getY(), null);
+    g.drawString(this.label, getX() - metrics.stringWidth(this.label) - 10, getY() + (getHeight() + metrics.getHeight()) / 2 - 2);
+    if (this.selected && this.cursorState == 1) {
+      g.drawLine(getX() + metrics.stringWidth(drawnString) - this.textStart + 6, getY() + 5, getX() + metrics.stringWidth(drawnString) - this.textStart + 6, getY() + getHeight() - 5);
+    }
+    g.setColor(Color.red);
+    if (!this.noBorder) {
+      g.drawRect(getX(), getY(), getWidth(), getHeight());
+    }
+  }
 
-	public int getBlinkInterval() {
-		return blinkInterval;
-	}
+  public boolean isClicked(int xCoord, int yCoord) {
+    if (xCoord < getX() || getX() + getWidth() < xCoord) {
+      return false; 
+    }
+    if (yCoord < getY() || getY() + getHeight() < yCoord) {
+      return false; 
+    }
+    return true;
+  }
 
-	public int getCursorState() {
-		return cursorState;
-	}
+  public void clear() {
+    this.text = "";
+    this.textStart = 0;
+    this.selected = false;
+  }
 
-	public Font getFont() {
-		return font;
-	}
+  public int getBlinkInterval() {
+    return this.blinkInterval;
+  }
 
-	public String getLabel() {
-		return label;
-	}
+  public int getCursorState() {
+    return this.cursorState;
+  }
 
-	public long getLastCursorChange() {
-		return lastCursorChange;
-	}
+  public Font getFont() {
+    return this.font;
+  }
 
-	public boolean isSelected() {
-		return selected;
-	}
+  public String getLabel() {
+    return this.label;
+  }
 
-	public String getText() {
-		return text;
-	}
+  public long getLastCursorChange() {
+    return this.lastCursorChange;
+  }
 
-	public int getTextStart() {
-		return textStart;
-	}
-	
-	public void setText(String newText) {
-		text = newText;
-	}
-	
-	public void setSelected(boolean isSelected) {
-		selected = isSelected;
-	}
+  public boolean isSelected() {
+    return this.selected;
+  }
 
-	public void setTextStart(int textStart) {
-		this.textStart = textStart;
-	}
-	
-	public void setCursorState(int cursorState) {
-		this.cursorState = cursorState;
-	}
+  public String getText() {
+    return this.text;
+  }
 
-	public void setLastCursorChange(long lastCursorChange) {
-		this.lastCursorChange = lastCursorChange;
-	}
+  public int getTextStart() {
+    return this.textStart;
+  }
+
+  public void setText(String newText) {
+    this.text = newText;
+  }
+
+  public void setSelected(boolean isSelected) {
+    this.selected = isSelected;
+  }
+
+  public void setTextStart(int textStart) {
+    this.textStart = textStart;
+  }
+
+  public void setCursorState(int cursorState) {
+    this.cursorState = cursorState;
+  }
+
+  public void setLastCursorChange(long lastCursorChange) {
+    this.lastCursorChange = lastCursorChange;
+  }
 }
Index: gamegui/Window.java
===================================================================
--- gamegui/Window.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ gamegui/Window.java	(revision 8edd04e287f45041eeee2cb294847453e4c6aac4)
@@ -3,71 +3,67 @@
 import java.awt.*;
 import java.awt.event.MouseEvent;
-import java.util.*;
+import java.util.ArrayList;
 
-public class Window extends Member
-{
-	ArrayList<Member> members;
-	boolean fullscreen;
-	
-	public Window(String newName, int newX, int newY, int newWidth, int newHeight) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		members = new ArrayList<Member>();
-	}
-	
-	public Window(String newName, int newX, int newY, int newWidth, int newHeight, boolean full) {
-		super(newName, newX, newY, newWidth, newHeight);
-		
-		members = new ArrayList<Member>();
-		fullscreen = full;
-	}
-	
-	public void draw(Graphics g) {
-		g.setColor(Color.black);
-    	g.fillRect(getX(), getY(), getWidth(), getHeight());
-    	
-    	if(!fullscreen)
-    	{
-    		g.setColor(Color.red);
-    		g.drawRect(getX(), getY(), getWidth(), getHeight());
-    	}
-    	
-    	for(int x=0; x < members.size(); x++)
-    		members.get(x).draw(g);
-	}
-	
-	public boolean handleEvent(MouseEvent e) {
-		boolean val = false;
-		
-		for(int x=0; x < members.size(); x++)
-    		val = val || members.get(x).handleEvent(e);
-		
-		return val;
-	}
-	
-	public void clear() {
-		for(int x=0; x < members.size(); x++)
-    		members.get(x).clear();
-	}
-	
-	public void add(Member aMember) {
-		aMember.offset(getX(), getY());
-		
-		members.add(aMember);
-	}
-	
-	public void offset(int xOffset, int yOffset) {
-		super.offset(xOffset, yOffset);
-		
-		for(int x=0; x < members.size(); x++)
-			members.get(x).offset(xOffset, yOffset);
-	}
-	
-	public Member getMember(String aName) {
-		for(int x=0; x < members.size(); x++)
-    		if(members.get(x).getName().equals(aName))
-    			return (Member)members.get(x);
-		
-		return null;
-	}
+public class Window extends Member {
+
+  ArrayList<Member> members;
+  boolean fullscreen;
+
+  public Window(String newName, int newX, int newY, int newWidth, int newHeight) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.members = new ArrayList<Member>();
+  }
+
+  public Window(String newName, int newX, int newY, int newWidth, int newHeight, boolean full) {
+    super(newName, newX, newY, newWidth, newHeight);
+    this.members = new ArrayList<Member>();
+    this.fullscreen = full;
+  }
+
+  public void draw(Graphics g) {
+    g.setColor(Color.black);
+    g.fillRect(getX(), getY(), getWidth(), getHeight());
+    if (!this.fullscreen) {
+      g.setColor(Color.red);
+      g.drawRect(getX(), getY(), getWidth(), getHeight());
+    }
+    for (int x = 0; x < this.members.size(); x++) {
+      ((Member)this.members.get(x)).draw(g);
+    }
+  }
+
+  public boolean handleEvent(MouseEvent e) {
+    boolean val = false;
+    for (int x = 0; x < this.members.size(); x++) {
+      val = !(!val && !((Member)this.members.get(x)).handleEvent(e)); 
+    }
+    return val;
+  }
+
+  public void clear() {
+    for (int x = 0; x < this.members.size(); x++) {
+      ((Member)this.members.get(x)).clear();
+    }
+  }
+
+  public void add(Member aMember) {
+    aMember.offset(getX(), getY());
+    this.members.add(aMember);
+  }
+
+  public void offset(int xOffset, int yOffset) {
+    super.offset(xOffset, yOffset);
+    for (int x = 0; x < this.members.size(); x++) {
+      ((Member)this.members.get(x)).offset(xOffset, yOffset);
+    }
+  }
+
+  public Member getMember(String aName) {
+    for (int x = 0; x < this.members.size(); x++) {
+      if (((Member)this.members.get(x)).getName().equals(aName)) {
+        return this.members.get(x);
+      }
+    }
+    return null;
+  }
 }
