wrightm96's Profile User Rating: -----

Reputation: 6 Worker
Group:
Active Members
Active Posts:
51 (0.06 per day)
Joined:
06-March 12
Profile Views:
1,339
Last Active:
User is offline Oct 23 2013 05:38 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
AMD
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   wrightm96 has not set their status

Posts I've Made

  1. In Topic: GroupAssignment.java

    Posted 8 Oct 2013

    You could check if the last name's first character value is between the desired values.

    if ('A' <= lastName.charAt(0) && lastName.charAt(0) <= 'I')
  2. In Topic: Give custom JPanel focus after it has lost focus

    Posted 5 Sep 2013

    Got it! It appears that I had accidentally added the key listener to my JFrame instead of my gamePanel. As soon as I made that change, it all works!

    Thanks everyone! :D
  3. In Topic: Give custom JPanel focus after it has lost focus

    Posted 5 Sep 2013

    I tried calling requestFocus() when the message is sent. I added a FocusListener to my game panel just to check. The focus listener shows that it receives focus, but my key listener still doesn't respond.
  4. In Topic: Give custom JPanel focus after it has lost focus

    Posted 5 Sep 2013

    gamePanel is setFocusable in its constructor. I tried setting it focusable outside the constructor, but that didn't help. If it's any help, I do see the print statement getting displayed when I click on the panel, so that works.
  5. In Topic: Give custom JPanel focus after it has lost focus

    Posted 5 Sep 2013

    Well, the idea is that the JPanel holds the game display, and it needs to have focus in order to receive the key strokes. In order for the user to type/talk to other players, they have to type in the textfield. So they click on this field, and that's when the original JPanel loses focus.

    EDIT: It still doesn't give the JPanel focus back when I remove the
    super.mouseClicked(e);
    

    EDITEDIT: I tried using
    e.consume();
    

    but that did not change anything.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
July 7
Gender:
Interests:
Game Design and Development
Programming Languages:
Java, C++, C#, Lua

Contact Information

E-mail:
Private

Friends

Comments

Page 1 of 1
  1. Photo

    abby23 Icon

    07 Mar 2012 - 10:36
    Hello
    Please, help me with my pk, and ck
Page 1 of 1