Please ignore this post, I have resolve the problem.
I use ActionListener to runt he following codes, but I could not change ImageIcon, as soon as I scroll the scrollPane up and down, the original ImageIcon will display
on the frame instead of the new ImageIcon. I have try icon.getImage().flush() but it did not work, still cannot update the new ImageIcon.
JScrollPane scrollPane = new JScrollPane(panel,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com