Uploader Comments (macheads101)
All Comments (46)
-
How can i stop the graphic from moving after i press a key??? pls help tnx
-
@RockerNamedJoe same here
-
@RockerNamedJoe You need to repaint();
-
How do I make a black background?
-
@Hoobes1 Did you import it from javax.swing?
-
Eclipse doesn't like the start() method for t. I don't know why, but I personally don't see a start() method it can refer to. It says "The method start() is undefined for the type Timer".
-
Mine moves but it leaves footprints. How to fix?!?
-
Oval doesn't move on my side. Can somebody please share a link to full source code so i can compare. Thank you very much!
-
@Lt0Th3M Same here
-
@MinecraftingDaddio In your keyReleased(KeyEvent e) method set vely and velx to 0. That way whenever you stop holding a key down your velocities will be 0.
Hey how can you count the number of times the arrow keys have been pressed can you help me with this please i really need it, Please and thank you
ComputerKing240 3 months ago
@ComputerKing240 Just have an integer variable that you increment (add one to) every time the key event is fired.
macheads101 3 months ago
I have a question, why did you need to have another application out for the JFrame and main method? you cant combine it all into one application?
scottyy888 4 months ago
@scottyy888 If by application you mean class, you do not have to. Your main class could be a subclass of JFrame, but in general this is not good practice. Therefore, it's best to split your code up between multiple classes.
macheads101 4 months ago
the method to keep it from going off screen would be the window size?
malakov5 1 year ago
@malakov5 no i go over keeping it from going off screen in the previous tutorial
macheads101 1 year ago