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

Swing.JComponent.getGraphics() API doc should be made consistent

XMLWordPrintable

      JComponent getGraphics() delivers a graphics context that
      is not suited for drawing, which is contrary to what the
      API states and the API documentation should be made consistent
      with it. In Swing.JComponent.getGraphics() it is stated:

         "Returns this component's graphics context, which lets you
         draw on a component. Use this method get a Graphics object
         and then invoke operations on that object to draw on the component."

      This is the opposite of:

         "None-the-less you should avoid, at all costs, grabbing the
         graphics and painting to it."

            Unassigned Unassigned
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: