public void paintChat(Graphics g)
    {
	g.setColor(Color.black);
	g.setFont(textFont);
	g.drawImage(chatBox, 0, -50, DungeonGame.frame);
	String text = "";
	
	if (awaitInput == false)
	{
	    switch (chatCount)
	    {
	    
		case 1:
		{
		    speakersName = "";
		    text = "You've cleared from a   daze. You can feel bloodrunning down your head. You look up to see a    guard smiling. He spits at you.....";
		}
		    break;
		case 2:
		{
		    speakersName = "GUARD";
		    text = "That's what you get you mutt. You won't get     rations for a week.";
		}
		    break;
		case 3:
		{
		    speakersName = "";
		    text = ".....";
		}
		    break;
		case 4:
		{
		    speakersName = "";
		    text = "He walks away to the    guards quarters.";
		}
		    break;
		case 5:
		{
		    speakersName = "";
		    text = "You notice you're not   the only one in here.   You look to your right, and in another cell is  an old man who starts tospeak with you.";
		}
		    break;
		case 6:
		{
		    speakersName = "OLD MAN";
		    text = "So what's your name?";
		}
		    break;
		case 7:
		{
		    speakersName = "OLD MAN";
		    text = "What are you in here forson?";
		}
		    break;
		case 9:
		{
		    speakersName = "OLD MAN";
		    text = "Well that's unfortunate.Now this may seem out ofnowhere but, what are   your strengths?";
		}
		    break;
		case 11:
		{
		    speakersName = "OLD MAN";
		    text = "You don't say! I used tobe into that sort of    stuff but then I got old HAHAHA!";
		}
		    break;
		case 12:
		{
		    speakersName = "OLD MAN";
		    text = "Well if you want to     break out of here there is a tunnel that I dug  going from this room to the other cells, or you could try to kill that  guard that bloodied you up earlier.";
		}
		    break;
		case 14:
		{
		    speakersName = "OLD MAN";
		    text = "I'm dying anyway,       there's no reason for meto try to escape. Here  take this note to my    wife if you get out AND take this key it will   open mostly everything. I swiped it off the     guard before you got    here.";
		}
		    break;
		case 8:
		{
		    speakersName = DungeonGame.mainPanel.panel.player.PlayerName;
		    text = "(1) I'm innocent! I     DIDN'T DO ANYTHING! I   SWEAR!                  (2) I had to kill them  all! I'm going to kill  them all...             (3) I pickpocketed a fewunlucky souls.";
		    
		}
		    break;
		case 10:
		{
		    speakersName = DungeonGame.mainPanel.panel.player.PlayerName;
		    text = "(1)I'm a warrior. I am   skilled with swords and shields.";
		    
		}
		    break;
		case 13:
		{
		    speakersName = DungeonGame.mainPanel.panel.player.PlayerName;
		    text = "(1)Aren't you coming    with me?                (2)Get up I'm not       leaving you here.";
		    
		}
		    break;
		default:
		{
		    DungeonGame.mainPanel.panel.chatActive = false;
		}
		    break;
	    }
	}
	
	if (charNum < text.length())
	{
	    
	    if (speakersName.length() > 0)
	    {
		y = 460;
		g.setFont(nameFont);
		g.drawString(speakersName, 15, y);
	    }
	    else
	    {
		y = 420;
	    }
	    g.setFont(textFont);
	    
	    if (chatText.length() < lineLength)
	    {
		chatText += text.charAt(charNum);
		g.drawString(chatText, 15, y + 40);
	    }
	    else
	    {
		if (overflow1.length() < lineLength)
		{
		    overflow1 += text.charAt(charNum);
		    g.drawString(chatText, 15, y + 40);
		    g.drawString(overflow1, 15, y + 80);
		}
		else
		{
		    if (overflow2.length() < lineLength)
		    {
			overflow2 += text.charAt(charNum);
			g.drawString(chatText, 15, y + 40);
			g.drawString(overflow1, 15, y + 80);
			g.drawString(overflow2, 15, y + 120);
		    }
		    else
		    {
			if (overflow3.length() < lineLength)
			{
			    overflow3 += text.charAt(charNum);
			    g.drawString(chatText, 15, y + 40);
			    g.drawString(overflow1, 15, y + 80);
			    g.drawString(overflow2, 15, y + 120);
			    g.drawString(overflow3, 15, y + 160);
			}
			else
			{
			    chatText = overflow1;
			    overflow1 = overflow2;
			    overflow2 = overflow3;
			    overflow3 = "" + text.charAt(charNum);
			    g.drawString(chatText, 15, y + 40);
			    g.drawString(overflow1, 15, y + 80);
			    g.drawString(overflow2, 15, y + 120);
			    g.drawString(overflow3, 15, y + 160);
			}
		    }
		}
	    }
	    charNum++;
	    try
	    {
		// Thread.sleep(20);
	    }
	    catch (Exception X)
	    {
	    }
	}
	else
	{
	    try
	    {
		Thread.sleep(1000);
	    }
	    catch (Exception X)
	    {
	    }
	    // DungeonGame.panel.chatActive = false;
	    
	    if ((chatCount == 10 || chatCount == 8 || chatCount == 13 || chatCount == 6))
	    {
		awaitInput = true;
		
		if (speakersName.length() > 0)
		{
		    y = 460;
		    g.setFont(nameFont);
		    g.drawString(speakersName, 15, y);
		}
		else
		{
		    y = 420;
		}
		g.setFont(textFont);
		g.drawString(chatText, 15, y + 40);
		g.drawString(overflow1, 15, y + 80);
		g.drawString(overflow2, 15, y + 120);
		g.drawString(overflow3, 15, y + 160);
		
		if (chatCount == 6)
		{
		    if (displayPrinted == false)
		    {
			DungeonGame.mainPanel.panel.add(display);
			displayPrinted = true;
		    }
		    String nameField = display.getText();
		    display.setText(nameField);
		    
		}
		
	    }
	    
	    if (awaitInput == false || key == true)
	    {
		chatCount = chatCount + 1;
		charNum = 0;
		clearChat();
		if (key == true)
		{
		    // System.out.println("KEY!");
		    key = false;
		    awaitInput = false;
		}
	    }
	}
    }