Here is my XML file to rotate an image in 360 degree movement.

To apply it to the ProgressBar and use it as the moving spinner, do it like this:

I have read some posts in forums that they had issues with the smoothness of the rotating animation. In my case, I did not see any issue with it. Perhaps old versions of the Android operating system contributed as a factor? I tested this with JellyBean and it worked out quite fine.

JPDFNotes is a Java bean that can be embedded in Java applications and applets to deliver PDF content to your users and allow them to add notes and comments and then save the annotated document.

The JPDFNotes API has a feature that will let you rotate a single page of the PDF file while not affecting the rest. This is through the getMutableDocument().setPageRotation() method of the JPDFNotesBean class. The rotation values can either be 0, 90, 180 or 270.

The sample code below rotates page 6 with an angle of 90 degrees.

I had a previous post regarding rotating a JLabel and that involved creating a class that extends the BasicLabelUI class to do the rotation. JButton also has a class of its own called BasicButtonUI that you need to inherit in order to do rotation vertically.

To set the JButton to a certain angle, just set the parameter as either 90 or 270 in the VerticalButtonUI class. Kudos to the developer who created this class (I don’t know who).

Here is the code for the VerticalButtonUI class.

Related Posts Plugin for WordPress, Blogger...