展开全部
//其余的类在qq上给你32313133353236313431303231363533e58685e5aeb931333262353363..
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Field;
import java.util.Properties;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.LookAndFeel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.filechooser.FileNameExtensionFilter;
public class ImageFrame extends JFrame implements ActionListener, MouseListener {
/**
*
*/
private static final long serialVersionUID = -5241799989073556019L;
static Properties property = new Properties();
static {
Class iClass;
try {
iClass = Class.forName("sun.awt.im.InputMethodContext");
Field field = iClass.getDeclaredField("belowTheSpotInputRequested");
AccessibleObject.setAccessible(new AccessibleObject[] { field },
true);
field.setBoolean(null, false);
} catch (Exception e) {
}
}
public JPanel imagePanel;
public JPanel buttonPanel;
public JPanel statePanel;
public JLabel imageLabel;
public JLabel stateLabel;
public JButton before;
public JButton play;
public JButton stop;
public JButton next;
public JButton bigger;
public JButton smaller;
static JTextArea area = new JTextArea(5, 60);
JScrollPane scroll = new JScrollPane(area);
public File picFile;
public Image img;
public ImageIcon imageIcon;
public String fileParent;
FileNameExtensionFilter imageFilter = new FileNameExtensionFilter(null,
"jpeg", "jpg", "png", "gif");
JFileChooser imageChooser = new JFileChooser();
public File filePath[];
public File imagePath[];
public static Picture images[];
public int imageFileNumber = 0;
public static int locationImage = 0;
public static ImageFrame myImageFrame;
private PlayTimer playTimer;
public Image[] imageOffer;
public int scale = 8;
public JScrollPane imageScrollPane;
public ImageFrame(String picPath) {
picFile = new File(picPath);
fileParent = picFile.getParent();