This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems in Focus

 
Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have many and varied questions about focus management in java 1.4, if anyone could direct me to a great source of information on that subject I would appreciate it.
One specific question I have has to do with KeyListeners. In 1.3 I was able to add a key listener to a JFrame which may have various other objects, lets say it has a scroll pane which includes a text area. When the frame had focus (one of the components held the focus) key events would fall through to the key listener on the frame. I could set up a key listener on a component that may consume some key events which would then not get to the listener on the frame, etc. In 1.4 this does not work, key events seem to be only visible to the actual component that has focus. Is that the way it really is, or am I missing something??
TIA
Shane
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Swing/AWT
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There looks to be a good reference to the new 1.4 Focus API here (It's a PDF from JavaOne 2001). I haven't used any of it yet, but there seem to be lots of complaints about things working differently in the Java Bug Database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic