java thread: animate numerical model

Sharky Forums


Results 1 to 3 of 3

Thread: java thread: animate numerical model

Threaded View

  1. #2
    Expensive Sushi
    Join Date
    Dec 2002
    Posts
    9
    You might want to look into the SwingUtilities.invokeLater() method. This lets you integrate some Runnable code into the Swing UI thread without messing up anything.

    Something like

    Code:
    //....
    // Your thread code here
    //...
    // Then when you're ready to update the UI:-
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
         // Code to update UI
      }
    });
    Last edited by znaps; 01-14-2003 at 04:59 PM.

Posting Permissions

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