• Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with URLConnection & JDialog  RSS feed

 
Mandar Jagtap
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
simple, add this to your code snippet

...
pleaseWait();
...
 
Julien Coe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!