资源简介
可根据关键字查找文件,包括(*.txt,*.java,*.jsp,*.html,*.htm,*.xml)
(注:新的版本发布了,加了一些新功能!http://download.csdn.net/source/2914935)
代码片段和文件信息
package Txt;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowFocusListener;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.ButtonGroup;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.Jframe;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.JToolBar;
import javax.swing.filechooser.FileFilter;
public class SearchText implements ActionListener WindowFocusListener
Runnable {
Jframe searchframe = new Jframe();
JDialog dialog = new JDialog(searchframe “设置“);
JPanel jpanel = new JPanel();
JPanel checkBoxPanel = new JPanel();
JPanel radioButtonPanel = new JPanel();
JPanel buttonPanel = new JPanel();
JLabel wordLabel = new JLabel(“关键字:“);
JLabel fileLabel = new JLabel(“搜索范围:“);
JLabel stateBar = new JLabel();
JTextField wordField = new JTextField();
DefaultListModel listModel = new DefaultListModel();
JList fileList = new JList(listModel);
JTabbedPane tabbed = new JTabbedPane();
JToolBar toolBar = new JToolBar();
JTextArea resultArea = new JTextArea();
JButton chooseDialog = new JButton(“选择“);
JButton searchButton = new JButton(“搜索“);
JButton setButton = new JButton(“设置“);
JButton aboutButton = new JButton(“关于“);
JButton exitButton = new JButton(“退出“);
JButton saveButton = new JButton(“保存设置“);
JButton cancelButton = new JButton(“取消“);
JScrollPane areaJsp = new JScrollPane(resultArea);
JScrollPane listJsp = new JScrollPane(fileList);
JFileChooser fileChooser = new JFileChooser();
ButtonGroup radioGroup = new ButtonGroup();
JCheckBox txtCheckBox = new JCheckBox(“*.txt“);
JCheckBox javaCheckBox = new JCheckBox(“*.java“);
JCheckBox jspCheckBox = new JCheckBox(“*.jsp“);
JCheckBox htmlCheckBox = new JCheckBox(“*.html“);
JCheckBox htmCheckBox = new JCheckBox(“*.htm“);
JCheckBox xmlCheckBox = new JCheckBox(“*.xml“);
JRadioButton caseRadioButton = new JRadioButton(“区分大小写“);
JRadioButton unCaseRadioButton = new JRadioButton(“不区分大小写“);
File[] files = null;
int mount = 0;
boolean txtIsSelect = true javaIsSelect = true jspIsSelect = true
htmlIsSelect = true htmIsSelect = true xmlIsSelect = true
caseIsSelect = false unCaseIsSelect = true;
public void init() {
searchframe.settitle(“一键搜索“);
searchframe.setSize(390 405);
searchframe.setLocationRelativeTo(null);
searchframe.setResizable(false);
searchframe.setDefaultCloseOperation(Jframe.EXIT_ON_CLOS
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 232 2009-08-22 10:26 File\.classpath
文件 500 2009-08-23 09:56 File\.project
文件 7930 2010-03-30 23:49 File\一键搜索.jar
文件 51 2009-08-31 11:37 File\bin\me
文件 12973 2010-08-16 17:40 File\bin\Txt\SearchText.class
文件 1072 2010-08-16 17:40 File\bin\Txt\SearchText$TxtFileFilter.class
文件 51 2009-08-31 11:37 File\src\me
文件 14277 2010-08-14 16:20 File\src\Txt\SearchText.java
目录 0 2010-08-16 17:40 File\bin\me
目录 0 2010-08-16 17:40 File\bin\Txt
目录 0 2010-07-28 02:04 File\src\me
目录 0 2010-07-28 02:04 File\src\Txt
目录 0 2010-07-28 02:04 File\bin
目录 0 2010-07-28 02:04 File\src
目录 0 2010-07-28 02:04 File
----------- --------- ---------- ----- ----
37086 15
相关资源
- java局域网聊天+文件传输系统
- java实现文字转语音文件和朗读
- 经典DBN代码详解JAVA版
- JavaMail帐号激活与忘记密码
- java屏幕录像(包含鼠标轨迹)生成
- java Library.java
- centos64位编译luajava1.1
- java从入门到精通全套视频教程
- java彩票模拟投注系统.zip
- java后台微信支付工具类
- 基于Android平台下的五子棋开发
- java__QQ聊天(聊天窗口设置不同颜色字
- java实现复制、粘贴、剪切、删除文件
- java版本websocket
- C语言AES加密解密,CBC模式,256含测试
- 基于sql server 2008+jsp+servlet+mvc设计模式
- JavaWeb(SSH入门项目,适合初学者,适
- 基于JAVA车辆管理系统
- java竞赛试题
- ffmpeg-java.jar
- java版围棋v4
- junit-4.9官方
- javax.json.jar
- java拼图游戏可自定义图片及块数
- RXTX包mfz-rxtx-2.2-20081207-win-x64.zip
- JAVA注册表垃圾清理
- 双色球程序JAVA编写的小程序
- Java模拟操作系统内存管理,进程管理
- java实现的海明码
- Java毕业实习报告模板
评论
共有 条评论