• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Problems in Focus

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Swing/AWT
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Let nothing stop you! Not even this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic