易截截图软件、单文件、免安装、纯绿色、仅160KB

用JAVA实现了带有复选框的树目录

JDK版本
        JDK1.4.x
    功能
        实现了带有复选框的资源管理器树目录,还有需要改进的地方,我在以后更新,如果那位朋友有好的建议欢迎提出
   
    欢迎大家提意见,交流
   
    代码如下
   
import javax.swing.tree.*;
import javax.swing.filechooser.*;
import javax.swing.event.*;
import java.awt.Cursor;
import java.awt.Component;
import java.awt.Font;
import java.io.*;
import java.awt.*;
import javax.swing.*;
import java.util.*;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
/**
 * Title: 系统级树目录
 * Description: 
 * Copyright: Copyright (c) 2004
 * Company: 
 * @author cuijiang contact cj0063@sina.com or cuij7718@yahoo.com.cn
 * @version 1.0
 */
public class AgileSuperJTreeBasic
    extends JTree
    implements TreeExpansionListener, TreeSelectionListener, MouseListener {
  protected DefaultTreeModel treeModel;
  protected FileSystemView fileSystemView; //建立文件系统视类对象
  protected FileNode root;
  public AgileSuperJTreeBasic() {
    Font myFont = new Font("宋体", 11, 12);
    fileSystemView = FileSystemView.getFileSystemView();
    root = new FileNode(fileSystemView.getRoots()[0]);
    root.explore();
    treeModel = new DefaultTreeModel(root);
    this.setModel(treeModel); //设定树形菜单
    this.addTreeExpansionListener(this); //打开/关闭节点事件
    this.addTreeSelectionListener(this); //选择的事件
    this.setCellRenderer(new MyTreeCellRenderer()); //生成图标
    this.setFont(myFont);
    this.setRootVisible(true);
    this.setRowHeight(18);
 


相关文档:

java实现输出字符串中的数字字符

package com.joe;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test
{
    //将字符串的数字字符输出
    public static void main(String[] args)
    {
        String str = "iu7i8hy4j ......

java小程序(2)

【文章标题】java小程序(2)
【文章作者】曾健生
【作者邮箱】zengjiansheng1@126.com
【作者QQ】190678908
【作者声明】本人水平有限,失误之处,敬请各位指出。本人以前写的一些小程序,分享一下希望对各位学习java有帮助 ^-^
***************************************************************************** ......

从C到JAVA,开始我的IT菜鸟之路!

真正发现人生需要知识的时候,我的青春已经浪费了一半。
于是鼓起勇气来到北大青鸟学习IT,鉴于多方考虑,还是选择了软件测试。
如今课业的一大半也已结束,从刚开始的一无所知,渐渐成长为一个菜鸟……
在课程的学习过程中,才渐渐发现自己对于这个行业的兴趣,尤其是软件开发这一块。
甚至对自己选择做测 ......

我的第一个FreeMarker模板生成java代码的例子

第一步.新建一个模板文件以.ftl结尾。
IDAO.ftl
 package com.media.dao;
import java.util.List;
import com.media.bean.${model_name};
import com.media.exceptions.DAOException;
/**
* ${model_name_cn}接口
*
* @author ${author}
* @link ${link}
*
* @version $Revision: 1.00 $ $Date: ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号