|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/mandarintools/download/ |
Upload File : |
import java.lang.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import javax.swing.tree.*;
public class zidian extends JPanel {
Hashtable englishhash;
Hashtable pyhash;
Hashtable radicalhash;
Hashtable rshash;
JTree rstree;
JTree kxtree, casstree;
// Use JTree ?
public final static int HEX = 0;
public final static int RADSTROKE = 1;
public final static int STROKES = 2;
public final static int PINYIN = 3;
public final static int ENGLISH = 4;
public final static int CANTONESE = 5;
public final static int VARIANT = 6;
public final static int FREQ = 7;
public final static int BIG5 = 8;
public final static int GB = 9;
DefaultMutableTreeNode[] kangxiradicals;
DefaultMutableTreeNode[] cassradicals;
zidian() {
kangxiradicals = new DefaultMutableTreeNode[214];
cassradicals = new DefaultMutableTreeNode[200];
DefaultMutableTreeNode top = new DefaultMutableTreeNode("Kangxi Radicals");
kxtree = new JTree(top);
loadradicals(top);
loaddict();
top = new DefaultMutableTreeNode("CASS Radicals");
casstree = new JTree(top);
englishhash = new Hashtable();
pyhash = new Hashtable();
rstree = kxtree;
this.add(rstree);
}
private void loadradicals(DefaultMutableTreeNode top, String radfile) {
top.add(new DefaultMutableTreeNode("1"));
top.add(new DefaultMutableTreeNode("2"));
top.add(new DefaultMutableTreeNode("3"));
top.add(new DefaultMutableTreeNode("4"));
top.add(new DefaultMutableTreeNode("5"));
}
private void loaddict() {
}
public static void main(String[] args) {
JFrame dictframe = new JFrame();
dictframe.getContentPane().add(new zidian());
dictframe.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
dictframe.pack();
dictframe.setVisible(true);
}
}