• 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

Issue with URLConnection & JDialog

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to establish a URLConnection based on outcome of JDialog but it looks like URLConnection does not wait till JDialog outputs something and proceed with result as null. The JDialog gets inputs from user and prepares an URL based on selection. I want to pass this URL to URLConnection to establish it but it looks like as soon as user clicks on any button, URLConnection does not wait to get the URL from dialog and proceed assuming its null.

Is it possible to make URLConnection to wait till the JDialog finishes? Can anyone please help me to make this working (to wait till Jdialog returns something)?

Below is the code snippet that I'm trying.



Thanks in Advance,
Mandy
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
simple, add this to your code snippet

...
pleaseWait();
...
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try with a JoptionPane it should be easier, especially if file paths are statics.

About your code, my guess is the dialog is never set to visible, nor modal, so there's no reason to wait for an answer.
reply
    Bookmark Topic Watch Topic
  • New Topic