java自动播放图片的相册_请给我的JAVA程序添加一个自动播放图片功能

展开全部

//其余的类在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();

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值