易截截图软件、单文件、免安装、纯绿色、仅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小程序(2)

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

java调用.net Webservice

一、.net Server端
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Web.Services.Description;
namespace WebApplica ......

MyEclipse设置java文件注释

MyEclipse设置JSP页面默认编码方式:
windows(窗口)-Preferences(首选项)-MyEclipse-Files & Editors-JSP-右侧encoding:设置为ISO10646/Unicode(UTF-8)
MyEclipse在Java文件中设置作者、日期等说明:
windows(窗口)-Preferences(首选项)-Java-Code Style(代码样式)-Code Templates(代码模版)-右侧Comments(注释)- ......

Java 常见设计模式

常用的设计模式分为如下 23 种模式:
Abstract Factory:
提供一个创建一系列相关或相互依赖对象的接口,而无需指定它们具体的类。
Adapter:
将一个类的接口转换成客户希望的另一个接口,使得原来由于接口不兼容而不能一起工作的那些类可以一起工作。
Bridge:
将抽象部分与它的实现部分分离,使之可以独立变化。
C ......

2009年java笔试题(亲身面试过的)

数据库部分:
1.举例说明Dynamic SQL的原理及应用?
2.举例说明数据库索引的优缺点?
3.如果由你来设计数据的rollback,你的思路和方案?
4.假设有一个table,名为pages,有四个字段,id ,url,title,body。里面储了很多网页,网页的url地址,title和网页内容,用一个
sql查询将url匹配的排在最前面,title匹配的在其次,b ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号