Discussion Board

Results 1 to 13 of 13

Threaded View

  1. #1
    Registered User
    Join Date
    Mar 2003
    Maastricht, The Netherlands

    Painting problem


    I've got the next "really not cool" problem:

    I've got a Canvas that draws a "please wait" screen with a hourglass en bla bla bla..... It's animated by using a Thread that changes the state of the Canvas (just an int that's changed every interval)

    The Canvas is showed if data is send to the server. Sometimes a Form was first shown (optionForm) before the WaitCanvas is set as current screen and sometimes it is set as current after another Canvas was shown.

    My problem is that if the WaitCanvas is shown after a Form, an empty screen is showed (Command's are showed, but no graphics ) But if the WaitCanvas is showed after another Canvas it is showed!

    The following code always outputs: wait shown!
    if(waitCanvas.isShown()) System.out.println("wait shown");
    else System.out.println("wait is not shown");
    But when I place the following code in the paint method of the WaitCanvas it outputs NOTHING... because the paint method is never called (but the Thread calls the repaint method every interval (300 ms))

    if(this.isShown()) System.out.println("painting showed");
    else System.out.println("painting unShowed");
    Can anybody enlighten me?
    Last edited by guidopater; 2003-05-30 at 11:29.

Posting Permissions

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