• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

No focus in JFrame fro JDialog

 
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating and running (setting visible) a JFrame from a JDialog, but the frame doesn't get any events, keys or mouse. When I click anywhere on the frame I get the Windows sound that I am clicking where nothing will happen.
If you can point me to a web page or book to learn how to use the focus manager I will appreciate that too; CORE JFC by Topley and CORE Java from Sun didn't tell me much.

Your help will be appreciated,

Alejandro Barrero
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm betting that your JDialog is a modal dialog, and that as such it will not allow focus to be transferred to a JFrame, even one it creates. If so, your choices are to either create the dialog non-modal, or why not launch another dialog from the first dialog instead of the JFrame? It seems backwards and strange to have a dialog launching a frame.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!