But a JPanel and a BufferedImage are two completely different animals and should not be expected to behave the same. The Graphics object obtained from a JPanel is only temporary and will be replaced any time the JPanel is repainted including repainting that is not under your control such as when the operating system requests a repaint of a portion of your app. So using this knowledge you will expect a JComponent's Graphics object will not to persist and adjust your code accordingly. Nothing strange here as long as you understand what's going on.
A great link that explains a lot of the inner workings of Swing painting is this one: Painting in Swing and AWT