Results 1 to 4 of 4
  1. #1
    prasad.vara is offline Member
    Join Date
    Jul 2010
    Location
    Hyderabad
    Posts
    21
    Rep Power
    0

    Default how to make the circle visible clearly, which is drawn by using Graphics object

    hi,
    I drawn a circle using drawOval method of Graphics object.It draws a circle but the outline of the circle is not clear means ,it has some cuts in between.please anyone help me.
    Thanks in advance,
    Prasad.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Does your circle extend to the boundaries of the container? Consider creating and posting an SSCCE to show the problem.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,240
    Rep Power
    19

    Default

    Cast the Graphics reference to Graphics2D and set the RenderingHint for turning anti-aliasing on.

    Recommended reading:
    Controlling Rendering Quality (The Java™ Tutorials > 2D Graphics > Advanced Topics in Java2D)
    and the rest of the 2D Graphics tutorial trail.

    db

  4. #4
    prasad.vara is offline Member
    Join Date
    Jul 2010
    Location
    Hyderabad
    Posts
    21
    Rep Power
    0

    Default

    It's really useful to me .I got the clear image.

    Thank you Mr. Darryl

Similar Threads

  1. Make shape rounding (moving in circle)
    By mneskovic in forum New To Java
    Replies: 8
    Last Post: 08-17-2010, 03:05 PM
  2. do I need to dispose of my Graphics object?
    By gib65 in forum AWT / Swing
    Replies: 3
    Last Post: 07-06-2010, 05:04 AM
  3. Replies: 2
    Last Post: 01-30-2010, 05:14 AM
  4. How to set line width in Graphics object?
    By inc_123 in forum New To Java
    Replies: 8
    Last Post: 08-15-2009, 10:34 PM
  5. How to make a MouseClick paint an object
    By Devilsfutbol17 in forum New To Java
    Replies: 6
    Last Post: 06-05-2008, 12:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •