Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 6 - Part II
Date: Tue Dec 4 2001 11:54 am
Author: White, David <white3@andrew.cmu.edu>
Subject: Problem found with GUI!

I found the problem. It is with the gui. The problem is that
if the player is not a human player, the game gets the first twelve characters of the players name. My name is "Computer", only 8 characters and hence an array out of bounds exception is thrown on the following line:

        p1name.setText(pb.playerName().substring(0,12));

For now I'll be: "Computer " and that seems to work fine...

Post response

Go to the previous messageGo to the following message
Current Thread Detail:
can't get gui to load myplayer class      White, David      Tue Dec 4 2001 11:27 am       
Re: can't get gui to load myplayer ...      White, David      Tue Dec 4 2001 11:50 am       
Problem found with GUI!      White, David      Tue Dec 4 2001 11:54 am       
Re: Problem found with GUI!      Maxim, Michael G.      Tue Dec 4 2001 6:27 pm       
message.id=1      Chen, Richard      Tue Dec 11 2001 1:23 am       
Re: message.id=1      Maxim, Michael G.      Tue Dec 11 2001 4:27 am       
3 items      Chen, Richard      Thu Dec 13 2001 2:37 pm       
1 more items      Chen, Richard      Thu Dec 13 2001 3:12 pm       

Back to previous screen