Here you are drawing on the image
Graphics2D g2 = (Graphics2D)image.getGraphics();
g2.drawString(textString, lastX, lastY);
To draw on the JPanel, use the panels graphic context,
not the graphic context of the image as you did above.
protected void paintComponent(Graphics g)
{
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.drawString(textString, lastX, lastY);