Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java.awt.Window.setFocusable() doesn't do anything?

Reply
Thread Tools

java.awt.Window.setFocusable() doesn't do anything?

 
 
Mark Space
Guest
Posts: n/a
 
      01-08-2008
Got this from a thread below by Hal Vaughan.

java.awt.Window.setFocusable() is inherited from java.awt.Component, but
for top level windows it doesn't seem to do anything. To make a top
level window not able to be focused, one should call
setFocusableWindowState() instead.

This feels kinda bug-ish to me. Confusing to programmers to say the least.

Would one ever need to call setFocusable() on a top level container? If
not, why not have have java.awt.Window override setFocusable() and
isFocusable() to call setFocusableWindowState() and
getFocusableWindowState() instead? This seems like what most folks
would expect.

Here's the skinny on the window focus system if you want to read it:

<http://java.sun.com/javase/6/docs/api/java/awt/doc-files/FocusSpec.html#FocusableWindows>


Anyone got any ideas?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments