Results 1 to 4 of 4
  1. #1
    2potatocakes is offline Member
    Join Date
    Sep 2008
    Posts
    43
    Rep Power
    0

    Default Anyone know how to interrupt a process forcibly?

    Hi guys,

    I've got a java process running from a basic GUI that will sometimes finish quite quickly but other times will take several minutes to finish depending on the size of the calculation I am making.

    While the process is running all of the buttons on my GUI are unaccessible.

    I was wondering if any of you guys know how to still be able to access the buttons and ultimately if it is possible to interrupt the process also using a button?

    Thanks in advance for you help!
    :p

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default

    Learn how to handle threading in Swing and your GUI won't be unresponsive.
    Lesson: Concurrency in Swing (The Java™ Tutorials > Creating a GUI with JFC/Swing)

    db

  3. #3
    toadaly is offline Senior Member
    Join Date
    Jan 2009
    Posts
    671
    Rep Power
    6

    Default

    You need to use a second thread to do the lengthy calculation.

  4. #4
    2potatocakes is offline Member
    Join Date
    Sep 2008
    Posts
    43
    Rep Power
    0

    Default

    Thanks guys, I read through those lessons you posted Darryl, thanks! Have never had to use threads properly before but have the GUI working perfectly now thanks ;)

Similar Threads

  1. Process running or not
    By smartsubroto in forum New To Java
    Replies: 4
    Last Post: 11-16-2009, 03:09 AM
  2. Process name
    By logicbug in forum Threads and Synchronization
    Replies: 1
    Last Post: 03-16-2009, 02:11 PM
  3. Process exit value = 128
    By trivektor in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-19-2008, 08:11 AM
  4. forcibly terminating io operations
    By arnab321 in forum CLDC and MIDP
    Replies: 2
    Last Post: 11-15-2008, 08:51 PM
  5. i need help in http process
    By sureshjava in forum New To Java
    Replies: 0
    Last Post: 01-29-2008, 04:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •