This tool provides a basic GIF editor as a viewer within the JBuilder IDE. It appears as the "Design" tab in the content pane when viewing a GIF image. A preview panel appears in the structure pane.
Several toolbars let you manipulate the image.
| Icon | Purpose |
|---|---|
| Rotate the image 90 degrees in an anticlockwise (counter-clockwise) direction | |
| Rotate the image 90 degrees in a clockwise direction | |
| Flip the image along its horizontal axis so that top becomes bottom and vice versa | |
| Flip the image along its vertical axis so that left becomes right and vice versa | |
| Move the image one pixel up and to the left | |
| Move the image one pixel up | |
| Move the image one pixel up and to the right | |
| Move the image one pixel to the left | |
| Move the image one pixel to the right | |
| Move the image one pixel down and to the left | |
| Move the image one pixel down | |
| Move the image one pixel down and to the right | |
| Magify the image in the grid to double its previous size | |
| Contract the image in the grid to half its previous size | |
| Save any changes to the underlying file | |
| Discard any changes and revert to the last saved image | |
| Change the dimensions of the image - details outside the new boundaries are lost | |
| Display this file | |
| Draw individual pixels in the current colour - you can drag to colour multiple pixels | |
| Make the colour from the selected pixel the current colour | |
| Replace the colour clicked on, and all connected pixels of the same colour, with the current colour | |
| Clear individual pixels (make transparent) - you can drag to erase multiple pixels | |
| Drag the entire image to a new position - details outside the image boundaries are lost | |
| Drag to draw a line in the current colour | |
| Drag to draw an oval in the current colour | |
| Drag to draw a rectangle in the current colour | |
| Drag to draw a rounded rectangle in the current colour | |
| Drag to draw a filled oval in the current colour | |
| Drag to draw a filled rectangle in the current colour | |
| Drag to draw a filled rounded rectangle in the current colour | |
![]() |
Select the colour to use for drawing. The last two buttons pop up a colour chooser when selected so that you can pick colours other than the basic ones. You can also use the Dropper tool to select an existing colour from the image. |
You can create a new GIF image by going to File | Open File and entering a new filename with a ".gif" extension. Then open up this viewer and create your new image, resizing as necessary.
To install the editor, just copy the *.jar file to the JBuilder/lib/ext directory, the *Doc.jar file to the JBuilder/doc directory, and restart JBuilder.
Portions of this code come from the JIconEditor component described by Claude Duguay in his February 2000 JavaPro article.
Writing out the GIF image uses the GIF encoder from Acme Java (http://www.acme.com/java/).
Written by Keith Wood (kbwood@iprimus.com.au).