import javax.swing.*;
import java.awt.*;
import java.awt.event.*;public class CCDViewer extends JFrame
{
private JLabel label = new JLabel(new ImageIcon("beauxSwing3.jpg"));
private JButton button = new JButton("Action");
private JScrollPane sp = new JScrollPane(label);
private String message = "Input the file's name: ";

public CCDViewer()
{
Container contentPane = getContentPane();
button.setMnemonic('T');
contentPane.add(sp, BorderLayout.CENTER);
contentPane.add(button, BorderLayout.SOUTH);
button.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
String s = JOptionPane.showInputDialog(message);
if (s != null)
{
label = new JLabel(new ImageIcon(s));
/*这个地方应该怎么写*/

}
}
});
}
public static void main(String args[])
{
GJApp.launch(new CCDViewer(), "Beaux 02-04-19", 100, 100, 600, 500);
}
}