You will need to pass the variables to the int(speed) of your Timer animation in the ActionListener of your Timer class. Your timer class will also need to implement KeyListener.
The Timer class has a setDelay method. setDelay() will not affect setInitialDelay(). So if you want your monster to begin moving at startup or when the event is fired you will set this up in your setInitialDelay() After the event is fired then you can use setDelay to control the monsters speed(Delay between the firing of your events such as keyPressed in your example)
I can't belive that I missed the setDelay(); command in the java class documents from Oracle!
Anyway, It turns out that all I needed to do was use this in my code:
(animation is the name of my timer, speed is the integer that I want to control)
This tells my timer that the delay is the variable speed.
Thanks Banderson for the setDelay(); command i forgot, Rubberman I apologize for not posting my code, I was in college at the time...
And Sirlink99... Thanks for the help with my program again and the link to the Oracle documents! The program still has a ton of bugs in it (just like in high school) and I finally figured out how to fix the bullet and add music =)
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...