• 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

how to restrict the focus between parent and child JFrame??  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a parent JFrame it contain a JButton. functionality of that button is to open another JFrame.

I want to restrict the focus of JFrame, means after closing the second JFrame focus should come into first JFrame(parent).
And focus should not come to first JFrameif second JFrame is open.

it is something like when you click on eclipse for create new project that time a window appear but without closing that small window
you can not perform action in the eclipse main window.
 
Saloon Keeper
Posts: 9703
192
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kumard,

It sounds like you want to use a modal window. Take a look at the JOptionPane class, it can create and display dialog windows for you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!