How to use JFileChooser to display image in a JFrame or JPanel
问题 I have created a program that can change the format of an image. Everything is working, but when I open an image through JFileChooser I am getting java.lang.ClassCastException . Please can somebody help me. I think I am making a mistake when using the file chooser. I am beginner, please can somebody help me as soon as possible? package helloWorld; import java.io.*; import java.util.TreeSet; import java.awt.*; import java.awt.event.*; import java.awt.geom.AffineTransform; import java.awt.image