View RSS Feed

Java AWT

Controlling Rendering Quality

Rate this Entry
by , 03-04-2012 at 05:51 PM (710 Views)
The Graphics2D class rendering are used for specifications like:

  • One wishes rendering objects as soon as possible.
  • Rendering of the higher quality graphics is required.

Create a RenderingHint object. Pass to setRenderingHints of class Graphics 2D so that to alter or set rendering hint attribute, in context of Graphics2D.

Graphics 2Dís setRenderingHint method is called so that to set 1 hint and pass it on a value pair key, for that hint which you wish to set.

In the RenderingHints class, key value pairs are given

For setting up the rendering hint by using method setRenderingHint, this code is used.
Java Code:
public void paint (graphics g){
    Graphics2D g2 = (Graphics2D)g;
    RenderingHints rh = new RenderingHints(

Submit "Controlling Rendering Quality" to Facebook Submit "Controlling Rendering Quality" to Digg Submit "Controlling Rendering Quality" to Submit "Controlling Rendering Quality" to StumbleUpon Submit "Controlling Rendering Quality" to Google