Spade (was Paint.JAVA)

Github: Here!

Some here may remember my occasional grumbling at the lack of a suitable Paint.NET equivalent for Linux.

Turns out that if I want something done right, I have to do it myself.

My priority is pixel art, so my idea of a Paint.NET clone may be different than yours if you’re a photo editor etc.

Here’s an automatically-updated screenshot:

Feedback would be appreciated to help this grow into a useful tool.

Very cool :slight_smile: May I suggest that you add those little rulers on the sides to indicate how far you are zoomed in? When you use ctrl+scroll it is hard to see if you have nothing on the screen. Just a suggestion.
Also, how did you export as a png? Does java do that for you or did you have to write an exporter?


ImageIO.write(image, "PNG", file);

Pretty cool. If I may make a suggestion. Call setLocationRelativeTo(null) after you make your windows visible, so they center on the screen. It makes it so much easier that dealing with frames at the top left corner of the screen.

Thanks for this man! I was dying for someone to make a linux clone of paint.net, because let’s face it: pinta is horrible.
Plus, it’s java ;D!

P.S.
I am tempted to write my own, since you only need ImageIO to write Images. Thanks again!

I have a suggestion:
Make a PlugIn System for this!

I am planning to switch to Linux, but I need a ‘Paint’ that is (very) similar to Paint.NET.
And a PlugIn-System would finally allow me to make my own special effects!

  • Longor1996

PS: I tried doing this too once, but failed already at the image-display.

Awesome! Are you going to implement a plug-in system? That would be neat.
Still lots of work to do, but I hope this works out beautifully.

Are you aware of this?

Yes, I will add plugins if I am able to.

@farrell2k: Thanks, I was wondering how to centre the window. Just never bothered to google it.

Maybe a good idea to add a preview window to see the overall image.

Small update:

  • Added Image Operations. Currently limited to Resize (Scale).
  • Added Information Menubar. Shows the current tool, the zoom level, and whether or not you’ve saved your changes.
  • The opened file appears in the window bar.
  • Increased history to account for image operations.
  • Windows/Dialogs appear in the centre of the screen.
  • Probably a few other things I forgot to mention.

Download in OP.

Very good. A couple suggestions:

  1. I would like to see a little border surrounding each pixel so I know where the pixel boundaries are.
  2. Maybe in addition to the text at the top, add an icon to the mouse pointer to know what tool is selected.
  3. Maybe add a preview of the currently selected color.

Keep up the good work!

Just one suggestion:
Stop using the Metal L&F, switch to Nimbus. Or else, I will find you, and I will kill you.

To center the drawing frame, just try something similar to this:


drawPanel.setLocation(((frame.getWidth() / 2) - (drawPanel.getWidth() / 2)), ((frame.getHeight() / 2) - (drawPanel.getHeight() / 2)));

  • Jev.

Okay, I’m not working on it right now, but the next update will hopefully include:

  • Nimbus LookAndFeel (already implemented)
  • Pixel Grid option under the View toolbar.
  • Centred Canvas (done that already as well). By the way, I didn’t need that code above. I just put the canvas into a JPanel, into the scroll pane instead of straight into the scroll pane.
  • Some kind of tool settings, and if that gets done easily enough, maybe a paint brush.

I’d give you a medal, but then you wouldn’t have 111 medals and 11 projects. Sorry. xD

A suggestion, please make the color picker another size, preferably higher than it’s wide, instead of how it is now. Also, please please make it not stick on top of all other windows, that’s just annoying. xD

Other than that, it’s looking good.

Cheers! :slight_smile:

Cool idea, I love it. Something absolutely essential for me that is currently missing is layers. It works smoothly on my laptop!

Also, just a random thought: how about using LibGDX with a Scene2d.ui GUI for this? For example Spine was made using this and looks just awesome. It also would make zooming in and out smoothly much better than is currently possible in Paint.NET. But that may be too much ;D

Good luck!

But then he would have to rewrite the entire program and you’d have to include LibGDX as a library, making the whole download larger. There’s honestly no point, just use Java2D so you only have to have Java installed, and you can keep the download tiny.

No, you could just use scene2d and nothing else. And libgdx honestly doesn’t take up that much space.

@Regenuluz: What do you suggest I do instead of making the colour picker window stick on top of others?
Any other changes to the colour picker (size/shape) won’t be made until after the next small update, as it would require me to actually program the pickers, instead of just rearranging the default Swing ones.

The Java2D library is based on modifying images, so why would I choose something else for making a program that does exactly that?

Layers are a future goal, and in fact the only area I was considering using OpenGL, due to the ease of blending. But I’ll find a way to do it with just Java2D.

Pixel grid is working, along with ellipses (ellipses took a bit of math). Just need to get some tool options working, and I’ll have another update ready.

@Heroes, well, just let it act as any normal windows, so it can be hidden beneath e.g. the window you’re actually painting in. :slight_smile:

Obviously it wont be as much of a problem, once the size of the window is “better”, but it’s still nice for people with small screens etc.

And since I can see that someone else broke your 111 medals, I’m going to throw mine in now.

Actually, the reason I made it stick was because in GIMP, I would lose the window and have to minimize everything else to get it back.
What you can do is just exit the window, and bring it back again when you need it. For now I’ll put in a keyboard shortcut to toggle the visibility.

I’ll look into shrinking it though.

Does anyone mind if the colour picker only has sliders? ie: No gradient square or swatches.