title: Dedicated drawing surface in Java?
body: <p>I want to do efficient 2D drawing in Java. I would like to have some kind of surface which I may draw freely without having to let the view hierarchy traverse and update, which may cause stutter.</p>
  
  <p>I have used a JPanel at first and called repaint() but I find it not to be optimal (and it is the reason I ask). The closest thing I have worked with is the Android's <a href="http://developer.android.com/reference/android/view/SurfaceView.html" rel="nofollow">SurfaceView</a> and it gives me a dedicated drawing surface.</p>
  
  <p>To achieve this dedicated drawing surface, do I need to use OpenGL or is there any equivalent <code>SurfaceView</code>?</p>