Boa noite Ari,
nao sei se eh isso. mas pela excecao apresentada, tente declarar o seu
metodo run() como synchronized e vc se funciona.
public synchronized void run(){}
Abracos,
Bruno
----- Original Message -----
From: Ary Junior
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 3:01 PM
Subject: [java-list] Interface Runnable
Por favor, tenho uma classe que extende de Canvas e implemanta a interface
Runnable. At� a� tudo certo, ent�o eu crio um thread da seguinte forma:
Thread thr = new Thread(this);
Sendo assim eu implemento o m�todo run() em meu Canvas e pronto t�
funcionando... At� que eu tento pausar o thread da seguinte forma:
thr.wait();
� voltada a seguinte excess�o:
java.lang.IllegalMonitorStateException: current thread not owner
Se algu�m pude me ajudar ficarei muito agradecido.
)))
(((
:::::::::::
| |--\
| Java | | Ary Junior
|______|--/
------------------------------ LISTA SOUJAVA ----------------------------
http://www.soujava.org.br - Sociedade de Usu�rios Java da Sucesu-SP
d�vidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
para sair da lista: envie email para [EMAIL PROTECTED]
-------------------------------------------------------------------------