File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Creating Arrow Icon Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Creating Arrow Icon Help" Watch "Creating Arrow Icon Help" New topic
Author

Creating Arrow Icon Help

Alexander Walker
Ranch Hand

Joined: Jun 04, 2010
Posts: 34
Hi,

Is there anyway to make an arrow Icon that looks good? I tried making one, but it doesn't look any good. Like the lines are not smooth (if you can say so), or like you can see the pixels.
Is there anyway to fix this? And Yes, I do need it to be an Icon.

The commented code are code to add a line at the edge of the arrow, making it a two colored arrow, one color at the edge, and one filled inside the arrow. But after doing that, the arrow became even more messed up.

Please help.

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
have a look at the code for BasicArrowButton
Alexander Walker
Ranch Hand

Joined: Jun 04, 2010
Posts: 34
Michael Dunn wrote:have a look at the code for BasicArrowButton


Thanks it helped a lot. I was able to do what I think is a pretty decent arrow.

Heres the code for it, for those who want it.

Alexander Walker
Ranch Hand

Joined: Jun 04, 2010
Posts: 34
I updated the code to make the arrows look better, and I made two versions, one where the width and height is the same. And one where the width is twice the size of the height. thought I should share them, They look nicer then the last version anyway.

Edit: I forgot to remove "g.translate(x, y);" in paintIcon




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Arrow Icon Help