File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with JButton

 
paul beppe
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in this code i have problems with buttonPause and buttonPlay:



where is the error???
 
Rob Camick
Ranch Hand
Posts: 2473
8
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You haven't stated what the problem is.

A couple of problems with your code:

1. I don't know what the "scroll" variable is.

2. The easiest way to do animation is to create and ImageIcon and add the Icon to a JLabel and add the JLabel to your panel. Then when you want to move the label you just invoke setLocation(...) on the label. There is no need for a custom class to keep track ofe the location.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic