Thank you for your help Norm. I have it working in a more manageable way now!
Type: Posts; User: Jams
Thank you for your help Norm. I have it working in a more manageable way now!
Well, the Player class is what I would like to add these KeyListeners to. That way the The Player receives a KeyEvent and respond accordingly.
Right now the Canvas has a KeyListener, Controller....
I'm creating a class to represent a player in a very small game. The Player class extends Object and has a whole slew of functionality in the works. Originally, I created a Controller class that...
Does anyone know if it is possible to add a key listener to an object that is not a Component or a subclass of a component?
I would like to add a key listener to a self defined class, but I'm not...
For future reference, please use
tags for code. It is much easier to read.
Your braces for your if statements don't match up. it should look more like this:
[code]
if (condition)
{
//code
}
Anytime. I am willing to help whenever I can.
--Jams
Welcome ITStudent02!
I would be glad to help with anything that I can!
--Jams
I lied.
private String itemNumber;
private String productName;
private int unitsInStock;
private double unitPrice;
private double totalInventory;
private String serialNumber;
I took a look at your code. I strongly recommend that you download an IDE such as Eclipse or NetBeans that will check your spelling. This is why I use Eclipse. (I couldn't spell to save my life)...
Do you remember the paint() function?
In the end it should look something like:
paint (Graphics g)
{
g.drawImage(parameters)
}
You should just be able to use null in place of the image...
No offense taken.
Let me know if you need further help.
Here it is:
Removed due to one of the "helpers" only having one damn post. Don't want kids to steal my hard work. I guess I'll find help elsewhere.[/QUOTE]
Whoa. Hey now. Don't be making...
I am going to assume that GBFrame is extending JFrame. Correct me if I am wrong.
Take a look at Container (Java 2 Platform SE v1.4.2) This is the container class which contains the all-powerful...
Well, there are a couple of places that you could start. What do you have so far?