JPanel class for capturing images returns a BufferedImage type