package source;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import javax.swing.border.LineBorder;
import javax.swing.SwingUtilities;
public class PictureShow extends JFrame implements ActionListener
{
private static final long serialVersionUID =
1L;
private
JButton jButton1;
private
JButton jButton4;
private
JLabel jLabel2;
private
JButton jButton3;
private
JButton jButton2;
private
JTextField jTextField1;
private
JLabel jLabel1;
private int
count=0;
private int
num=0;
private
ArrayList list=new
ArrayList();
public static void main(String[] args) {
SwingUtilities.invokeLater(new
Runnable() {
public void
run() {
PictureShow
inst = new PictureShow();
inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}
public PictureShow() {
super();
initGUI();
}
private void initGUI() {
try {
GroupLayout
thisLayout = new GroupLayout((JComponent)getContentPane());
getContentPane().setLayout(thisLayout);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("图片显示V1.0---王荣喜");
{
jLabel1
= new JLabel();
jLabel1.setText("\u6253\u5f00");
}
{
jTextField1
= new JTextField();
}
{
jButton1
= new JButton();
jButton1.setText("\u6d4f\u89c8...");
jButton1.addActionListener(this);
}
{
jButton4
= new JButton();
jButton4.setText("\u653e\u5165\u96be\u9898\u518c");
jButton4.addActionListener(this);
}
{
jLabel2
= new JLabel();
jLabel2.setBorder(new
LineBorder(new java.awt.Color(0,0,0), 1, false));
jLabel2.setSize(600,
450);
}
{
jButton2
= new JButton();
jButton2.setText("\u4e0a\u4e00\u5f20");
jButton2.addActionListener(this);
}
{
jButton3
= new JButton();
jButton3.setText("\u4e0b\u4e00\u5f20");
jButton3.addActionListener(this);
}
thisLayout.setVerticalGroup(thisLayout.createSequentialGroup()
.addContainerGap()
.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1, GroupLayout.Alignment.BASELINE,
GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1, GroupLayout.Alignment.BASELINE,
GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1, GroupLayout.Alignment.BASELINE,
GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE,
GroupLayout.PREFERRED_SIZE)
.addComponent(jButton4, GroupLayout.Alignment.BASELINE,
GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(thisLayout.createParallelGroup()
.addComponent(jLabel2, GroupLayout.Alignment.LEADING, 0, 496,
Short.MAX_VALUE)
.addGroup(thisLayout.createSequentialGroup()
.addGap(210)
.addGroup(thisLayout.createParallelGroup()
.addGroup(GroupLayout.Alignment.LEADING,
thisLayout.createSequentialGroup()
.addComponent(jButton2, GroupLayout.PREFERRED_SIZE,
GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)