📄 imagefilechooser.java
字号:
package IrisRecog;
/**
* ImageFileChooser.java
*
* Extends the JFileChooser swing component by adding an image preview pane
* to the right and setting the filter to select only jpg/jpeg images.
*
* @owner Michael Huffman
* @author Team 6: A. Bare, I. Chaugule,M. Huffman, M. Pearson, C. Schell
* @version 0.0.1
*
* CSC 480 Section 2
* Fall 2005
* 10/2/05
*
* Edit History:
* 10/2/05 - created
*/
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.filechooser.*;
public class ImageFileChooser extends JFileChooser
{
/**
* Constructs a new file chooser to find image files
*/
public ImageFileChooser()
{
this.addChoosableFileFilter(new ImageFilter());
this.setAcceptAllFileFilterUsed(false);
try
{
//Set the default directory to the image folder
this.setCurrentDirectory(new File("../images"));
}
catch(Exception e) { }
//Add the preview pane.
this.setAccessory(new ImagePreview(this));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -