M
Mark Space
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?
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?