As i paint any figure in Java, the lines don't look smooth and I clearly see pixels. Any not very difficult solutions?

Recommended Answers

Cast your Graphics reference to Graphics2D and turn on anti-aliasing:[CODE]Graphics2D g2D = (Graphics2D)g;
g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
[/CODE]

Jump to Post

All 2 Replies

Cast your Graphics reference to Graphics2D and turn on anti-aliasing:

Graphics2D g2D = (Graphics2D)g;
g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
commented: That really solves my issue! +1