• Post Reply Bookmark Topic Watch Topic
  • New Topic

JWindow problem  RSS feed

 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there
I declared a JWindow with the size of the actual Windows-Screen-Size (Toolkit.getDefaultToolkit().getScreenSize() ;) .
When I place a JButton into that JWindow, I'm able to click it.
When I place a JTextField into that JWindow, I'm NOT able to enter any text although the Text-Field isn't disabled. But I can see it.
NOW: When I change the superclass from JWindow to JFrame, everything works fine. Does anyone know what I'm doing wrong?
Thanks in advance
Praiser
[ November 10, 2003: Message edited by: Meyer Florian ]
 
Joe Ess
Bartender
Posts: 9439
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the API Documentation:

For a Window which is not a Frame or Dialog to be focusable, its focusable Window state must be set to true, its nearest owning Frame or Dialog must be showing on the screen, and it must contain at least one Component in its focus traversal cycle. If any of these conditions is not met, then neither this Window nor any of its subcomponents can become the focus owner.
 
Meyer Florian
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow great, thanks! didn't know that...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!