title: Extending Graphics2D class without implementing all methods
body: <p>I have a class named MyClass and I want this class to extend Graphics2D (in java.awt). However when I type  <code>public class MyClass extends Graphics2D { .... }</code> I have to add the unimplemented methods draw, drawImage, addRenderingHints, etc. because Eclipse shows this error and it won't compile.</p>
  
  <p>This is where the question comes to my mind: I just want to use <strong>draw</strong>, <strong>setBackground</strong> and other few methods of Graphics2D, I don't want the rest of the code coming with other unimplemented methods which are mandatory.</p>
  
  <p>Is there a way to avoid this? Because I'm extremely clean and simple when it comes to code and I don't want other 100 lines of code which I don't even use.</p>
  
  <p>What are your suggestions?</p>