Results 1 to 4 of 4
Thread: 2 quick questions
- 05-18-2012, 01:53 AM #1
Member
- Join Date
- May 2012
- Posts
- 1
- Rep Power
- 0
2 quick questions
Hey, everybody. I'm in AP Computer Science 1, and we have to do a project that requires us to use keys to move an actor around in GridWorld. We also need to maximize the JFrame, but for some reason I can't get it to maximize. So, my questions are:
1. How do I maximize a JFrame and where in the code do I put it?
2. How do I get the WASD keys to act as arrow keys and move around the grid?
I don't have the code with me now, so I can't post what we currently have, but any possible help would be appreciated. Thanks!
- 05-18-2012, 02:28 AM #2
Member
- Join Date
- May 2012
- Posts
- 18
- Rep Power
- 0
- 05-21-2012, 06:44 PM #3
Re: 2 quick questions
You'll need to measure the screen first, and then set the size of your frame based on that.1. How do I maximize a JFrame and where in the code do I put it?
ActionListeners - specifically a KeyListener will do the trick.2. How do I get the WASD keys to act as arrow keys and move around the grid?Last edited by quad64bit; 05-21-2012 at 08:08 PM.
- 05-21-2012, 07:48 PM #4
Re: 2 quick questions
Forum Rules -- particularly the third paragraph
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
Two quick questions
By smacker in forum New To JavaReplies: 1Last Post: 03-07-2011, 12:11 AM -
quick q&a
By aizen92 in forum New To JavaReplies: 2Last Post: 12-28-2010, 11:55 AM -
Quick Help!!
By MrA in forum New To JavaReplies: 1Last Post: 11-10-2010, 07:38 PM -
Quick help
By locazor in forum New To JavaReplies: 15Last Post: 10-17-2010, 07:07 PM -
Couple quick log4j questions
By lowlyintern in forum New To JavaReplies: 1Last Post: 06-22-2010, 06:14 PM


2Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks