This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.
  • 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Query on zipping of file??

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all friends,
Iam zipping file through my swing interface and showing the progress of zipping on ProgressMonitor.Iam selecting file by opening FileDialog box on the action event of button,Now my problem is when iam selecting file from my hard disk through FileDialog box for zip, my whole swing interface and ProgressMonitor going to disable and after completion of zipping both are enable.Can any one plz guide me how I can slove this problem.Below r my codes.

Regards
Bikash
[ July 03, 2003: Message edited by: Bikash Paul ]
[ July 03, 2003: Message edited by: Carl Trusiak ]
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look into running your zip process on another thread. You'd have to move the code to a new class that is runnable (better encapsulation is a free benefit) and start it. Then your zip class can call SwingUtilities.invokeLater() or invokeAndWait() with progress updates. These accept yet another runnable object, and run the object back on the original Swing thread.
All this allows the Swing thread to accept mouse gestures and keystrokes or update visual goodies like your progress bar while your zip is running.
Hope that helps!
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for ur suggestion.
Thanks
Bikash
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic