|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Action Listener Problem
Dear Members ,
I have a task of editing a java program. I am sending it as a jar file so that you can have a look at it. There is a blue color rectangle which can be moved up and down by using the mouse and using up and down arrow keys also. I even want to move the blue color rectangle by clicking on the up and down arrow buttons which i have created in the program. As i am new to java,I am facing some problem in linking the code to the up and down arrow buttons. Can any one solve the problem. Thanks in Advance |
|
#2
|
|||
|
|||
|
sravan,
You need to add a check in your actionPerformed method that checks whether or not your UButton or DButton have been pressed (triggered). Then simply add the code you want (your drawing methods, as well as a call to repaint() ). Have you had any progress with this? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Action Listener Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|