i just found out that the println statement only print the 2 println i added at paint component.. the one at the timer actionperformed method isn't being printed... thought the sequence of the program is to do the println first before calling repaint().
timer actionperformed:
class btRec implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
System.out.println("timer repaint");
repaint();
}
}
paint method:
public void paint(Graphics g) {
super.paint(g);
hangman(g,wrong);
if(firstRun)
{
firstRun=false;
btPlay.sendMessage("play");
}
System.out.println("Timer status: "+t1.isRunning());
System.out.println("Timer repeat: "+t1.isRepeats());
.....
command prompt output of jar program:
C:\Users\Ben\Dropbox\presentation\demo>java -jar Hangman.jar
BTSend Log.listener: Using Bluetooth device with address = 00165316F6AD
BlueCove version 2.1.0 on winsock
BTSend Log.listener: Connected to null
Sending msg: play
Timer status: true
Timer repeat: true
BlueCove stack shutdown completed
so now i am not sure if it is the timer error of paint component error... tried the tutorial provided but the error still exist...