【文章內(nèi)容簡介】
())。 (new FlowLayout())。 (new FlowLayout())。 (new FlowLayout())。 (new FlowLayout())。 (l1)。 (ph1)。 (b1)。 (l2)。 (ph2)。 (b2)。 (b3)。 (p10)。 (p11)。 (p12)。 (p13)。 (p14)。 add(p1)。 add(ps)。 // add listener (new CFileChooseLis(ph1))。 (new CFileChooseLis(ph2))。initFile()。 (new CAnalyzeLis(this, area))。 } public File getAnalyzeFile() {return f1。} public File getDictionFile() {return f2。} public void initFile() { f1 = ().equals() ? null : new File(())。 f2 = ().equals() ? null : new File(())。 } public static void main(String[] args) { FileTextChecker f = new FileTextChecker()。 }}默認(rèn)屬性類:package pare1。public class IntString extends Object { int num = 0。 public IntString(int i) {num = i。 } public int getNumber() {return num。} public void add() {num += 1。}}package pare1。import 。import 。public class CFileChooser extends JFileChooser { // @override public boolean accept(File f) { if (f == null) return false。 if (()) return true。 if (().endsWith(.txt)) return true。 return false。} public boolean choosedFile() { int state = (null)。 File f = ()。 if (accept(f) amp。amp。 state == ) {return true。} return false。}}package pare1。import 。import 。import 。import 。public class CFileChooseLis implements ActionListener { public CFileChooseLis(TextComponent rst) { t = rst。} TextComponent t。 public void actionPerformed(ActionEvent e) { if (t == null) return。CFileChooser chooser = new CFileChooser()。 i