Nevermind. I just realized I forgot to include the setFocusable(true) command in the constructor. Sorry I didn't notice before.
Type: Posts; User: soradogoof
Nevermind. I just realized I forgot to include the setFocusable(true) command in the constructor. Sorry I didn't notice before.
also here is the icon if anyone wants to run the program for themselves:
http://3.bp.blogspot.com/_R-wUtcHKmFA/Sap1vvvc-xI/AAAAAAAAAOc/7jKyM9uMlHI/S45/goku%2Bgif.gif
Just for fun I am trying to make my own version of the old game Crazy Taxi. I am only to the point of having the character however. I am at the stage of trying to make sure the character (goku icon)...
Okay, I changed the
pa.fillOval(100,100,50,50); to just repaint(). This got rid of my NullPointException error but now, the initial circle is drawn and nothing else happens.
This is what my code...
The exception occurs here:
public void run()
{
pa.fillOval(200,200,50,50);
}
I made Graphics pa object static to get rid of an "unable to reference a nonstatic...
I just recently learned how to incorporate time into my programs. Specifically using the Timer and TimerTask classes to make a specific action occur after a certain amount of times, and repeat every...
Hi. I am still a beginner at programming but am doing very well with it so far. I've taken a semester and a half of java in college and am currently teaching myself python on my own. Due to personal...
now how do i denote this post as solved?
Anddd solved! Thank you very much!
i took away the definition inside the constructor and that got it going. Now I'm getting and exception found error
Here is my new output:
----jGRASP exec: java MatrixFileTester
reading from...
It is defined in the beginning of the program and inside the constructor. That's all.
Idk what happened to abunch of the posts but numRows is not altered after it gets set to 9 in the constructor. Accessed alot, but not altered. ?????
Never again altered*
It is declared at the beginning of the class, set to 0 at the beginning of the constructor, and then set to 9 after the constructor reads the input file. After that, it is accessed multiple times but...
Ah. There's the problem. In the method numRows is equal to 0. But it gets set to 9 in the constructor. Why does it reset?
I still can't find the problem. The only variable I missed that that method used was the array matrix[][] . Which I have added a print statement for and I have the same issue. It is equal to 0 before...
Here's my updated matrix class: (i only updated the detectErrors method, i will take correcting the methods one method at a time for easier thought-process. although hopefully whatever is the issue...
Not working at all*
I have added println statements to the detectErrors method and discovered hat for some reason, the for loop is not being entered. I am posting this reply with my phone so as soon as I get home I will...
Well after I put it in the java code format the smileys don't appear anyway so...
Oh. an open parenthese makes the faces. That makes sense. Well. Not much I can do about that. and I'll get the highlighting right real quick.
And I called all the methods in the driver program...
Um. I'm not sure why in the correction private methods it changed all the equal signs to broken heart faces but yeah...those are equal signs.
This is a homework assignment for my csci 1302 class. The assignment is for the program to read a matrix of numbers from an input file (provided by the user), count up the number of rows and columns...