Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4244537

drawArc() in a JPanel looks ugly on 1.2.x

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.2.1, 1.4.0
    • client-libs
    • 2d
    • generic, x86
    • solaris_8, windows_nt



      Name: skT88420 Date: 06/07/99


      Arcs drawn with JDK 1.2.1 & 1.2.2RC1 looks ugly when we draw them
      in a JPanel. The same lines put in a Panel draw arcs the right
      way.
      JDK 1.1.8 with either swing-1.1 or swing-1.1.1-beta2 isn't
      affected. I did not tested JDK 1.2, only 1.2.1 and 1.2.2 RC1.
      (all under NT4+SP4)

      Here's a source which show this bug :


      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;

      class customPanel extends JPanel {
      public void paintComponent( Graphics g ) {
           super.paintComponent( g );
      g.setColor( Color.black );
      g.drawArc( 57, 25, 6, 6, 0, 360 );
      g.drawArc( 70, 40, 6, 6, 0, 360 );
      g.drawArc( 57, 40, 6, 6, 0, 360 );
      g.drawArc( 70, 25, 6, 6, 0, 360 );
      }
      }

      class mainFrame extends JFrame implements WindowListener {
      public mainFrame() {
      super();
      addWindowListener(this);
      this.getContentPane().add( new customPanel(), BorderLayout.CENTER );
      }

      public void windowClosing(WindowEvent e) { System.exit(0); }
      public void windowClosed(WindowEvent e) {}
      public void windowActivated(WindowEvent e) {}
      public void windowDeactivated(WindowEvent e) {}
      public void windowDeiconified(WindowEvent e) {}
      public void windowIconified(WindowEvent e) {}
      public void windowOpened(WindowEvent e) {}
      }

      public class zz {
      public static void main( String args[] ) {
      Frame xx = new mainFrame();
      xx.setSize( 300, 300 );
      xx.show();
      }
      }
      (Review ID: 84035)
      ======================================================================

            Unassigned Unassigned
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: