• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JFrame Problem

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...
I am running a mapping application that accepts info from the user in a JFrame, and then loads a map according to his preferences in a second JFrame. I wish to load the layers of the map visually layer by layer. This works fine if I dont use two separate JFrames (if I hard code the user info) However... my problem occurs when I try to take the user info in the first frame, then load the map layers in the second... nothing displays until all the layers have loaded - then they all show togather!
The First frame appears to block the second one from rendering properly.
Any suggestions as to what the problem might be or a way around it?

Thanks,

Eoin.
 
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Possibly this is a 'doing something time consuming on the Swing thread' problem? There was a nice little TechTips article about this recently.
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My first idea about this was that it might be a focus problem (j2se 1.4+) as pointed to in the isFocusableWindow method of the Window api. So I tried a couple of tests to see, one with loading components and the other with drawing images. Both worked just fine in j2se 1.5.
 
Eoin Mac Aoidh
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Stuart and Craig, I found a simple way around the problem: By using a coustom dialog for the user to enter his details, when the details are entered the dialog disposes and the main frame loads.

Thanks again,

Eoin.
reply
    Bookmark Topic Watch Topic
  • New Topic