• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FocusListener's isTemporary()

 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
there is a confusion in my mind about isTemporary() method,
say, we have a button in a frame and it's selected. so when we minimize that frame we get temporary focus lost on that button and isTemporary() is true in that case (becuase actually focus is not lost and when we maximize the frame again we still have focus on that button)
but, when we will have temporary focus gained??? meaning when we can have isTemporary() true in focusGained() method???
if someone can give me an example it would be great. i tried to think of the example but i'm not able to come up with any example.
thanks!
maulin.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
isTemporary() belongs to FocusEvent, not FocusListener.
Temporary loss of focus includes other operations that are perceived as "quick grabs" from the current component. For example, when the user manipulates the scrollbar's slider, the button shouldn't be simultaneously clickable. Focus changes accordingly, but only for as long as the scrolling operation continues.
When scrolling is complete, all FocusListeners are notified that attention is now back on the original button.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
reply
    Bookmark Topic Watch Topic
  • New Topic