When trying to use the Graphics2D class, NetBeans offers to implement abstract methods from this class, how to make it so that the methods do not implement, and immediately get the opportunity to render objects?

    2 answers 2

    Inherit JPanel, override the paint (Graphics g) method and change the type of g:

    public void paint (Graphics g) { Graphics2D g2 = (Graphics2D) g; ... } 

      the graphics object is converted to graphics2d