18 September 2004 - java_dev (original) (raw)

Java developers

September 18th, 2004

| | 01:24 pm - kalo_khei static ArrayList directions = new ArrayList(24);directions.set(0, "N");directions.set(1, "NORTH");......For some reason, when I try to compile a program with this code in it, I get an error that says expected for each of the lines directions.set(0,etc.);. Why does this happen, and what can I do to fix it? | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

09:55 pm - ablotial Does anyone here know an easy way to rotate an image in Java?I'm working on a free-time project. Currently, I have a few pictures (PNG if it matters) which are stored in Image objects in my program. At certain times in the program, I need to be able to rotate them 90 degrees.In searching on google and in textbooks, all I've been able to find are things called "PixelGrabber" which by the look of it are a lot more work than they're worth. I have not been able to find a "Rotate()" funciton to work on Images. What I ended up doing was just uploading 4 versions of the pictures I needed rotated, but I'd rather not do that if it can be avoided. Any suggestions?