I found another way to get around the problem I had. It's more of a bandaid fix as I still have an issue with casting, but I can at least get the String value I want now and create a new ListNode...
Type: Posts; User: DOLZero
I found another way to get around the problem I had. It's more of a bandaid fix as I still have an issue with casting, but I can at least get the String value I want now and create a new ListNode...
Exception in thread "main" java.lang.NumberFormatException: For input string: "comedy"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at...
I tried running the line you wrote for the scanner and got an error when I tried to compile the program. I am fairly certain that the initial error that is causing me problems has to do with trying...
All that I have entered for user input is "a comedy" and "1". The rest is output from the program.
Should I modify the following line to match what you typed in?
Scanner stdin = new...
I think I get what you are saying. In situations where there are no items in the list, it will try to getNext() when there is no item to get. I will see about how I can fix this.
@Norm: Here is...
I'm getting a bug with this program I am writing for my CS class. Pretty much got it nailed down to a casting error. It happens when I try to retrieve a value from a node in an existing list...
Sounds like a plan. I am gonna rewrite much of my code and try to clean up all of that mess I have going on. My system for collision detection is far from efficient, and really bogs down the game...
I had thought about that, but the main reason I didn't want to include a break for those was because I wanted players to be able to press multiple buttons at once. If someone is holding down up and...
I was having problems getting the toggle breakpoint to start where I wanted the debugging to start. Not sure why, but when I clicked to add a breakpoint it never showed up. I will try adding in some...
I am trying to develop a simple 2D gaming engine. The latest bug I have come across involves the keyboard input not correctly changing the proper variables and the display output is getting confused...
I think I figured out a way to do what you are suggesting. I created a JFrame variable to use as the general frame and made it static so I could access it anywhere in the code. It seems to work,...
I got it. It's old code that I haven't optimized. That doesn't help me with my current issue.
I am not quite sure I follow you. Are you referring to this:
JPanel p2 = new KeyboardPanel();
p2.setSize(0, 0);
I am working on a program to run a game engine. Right now I am working with a frame that has two panels in it. One is for the main display, and the other is for the keyboard controls. The problem I...
Thanks for the reply. What you said makes a lot of sense and I will definitely give it a try. I am pretty new to GUI and the layout stuff, and didn't even think of that.
I am running a code that uses border layout to manage 2 frames. One frame is a window in which I am displaying some graphics, located in the CENTER region. I have another frame in the SOUTH location...
Ah, that's right. You helped me realize where I went wrong. When I was creating each environment object I was putting it in environment[i] in the loop, which i always increased by 1, whether it made...
Okay, I think I have got it narrowed down. It seems there is something going on in this bit of code here:
for (int i = 0; i < environment.length; i++){...
I added in "system.out.prinrln(environment);" right before the line and it printed out "[LMark2.environment;@5d6d2633" in the console.
Although I am not sure if that is exactly what you meant....
line 121 appears to be this line in the code:
for (int i = 0; i < environment.length; i++){
I am pretty sure that environment is already initialized as an array before the program ever reaches...
The errors happen whenever the program tries to paint graphics to the frame. With the timer code commented out, the errors only appear the one time:
edit: errr, it appears twice:
Exception in...
I have been working on a program to run a basic 2 dimensional sidescrolling game. Right now I am trying to get the basic image window working. I was able to get a simple version to run, but now that...
Its going to be more of a mario style game. It also sounds like I should be just fine with the pixel based system that I already started building. Thanks guys :)
I have been working on a program for a little while now. Now that I got my GUI stuff figured out (had no idea what I was doing when I started) I am working on getting the rest of my game together....
Thanks for the input. I haven't had a chance to get back to the program since last weekend. I got things working as far as moving stuff around the screen by putting in a timer and an action listener,...