Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+9 votes

ex.) using .isKeyDown("Left") on a BufferedImage panel

asked in CSC305 Fall 2019 by (8 points)

1 Answer

+4 votes

BufferedImage is not a panel. It's merely an image.

The panel object is what would need to interact with keyboard/mouse etc.

(Note: ideally, it would be better to use raw Swing or JavaFX, instead of using the DrawingPanel from CSC 211 -- it was meant for educational purposes, not for building real software / games.)

answered by (3.1k points)

Thank you!