Java examples for 2D Graphics:Graphics
get Antialiasing Hints
//package com.java2s; import java.awt.RenderingHints; public class Main { protected static RenderingHints qualityHints = null; /**//w ww .j av a2 s .c o m * */ public static RenderingHints getAntialiasingHints() { if (qualityHints == null) { qualityHints = new RenderingHints( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); qualityHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); } return qualityHints; } }