Topic: 跪求!添上代码就出这样的错,急用。请路过的朋友帮忙看看啊。 |
Print this page |
1.跪求!添上代码就出这样的错,急用。请路过的朋友帮忙看看啊。 | Copy to clipboard |
Posted by: nogod Posted on: 2005-01-12 08:58 我用向导生成了一个frame,在上面添加了一个JSplitPane,然后在左边又添加了一个JTree对象,并接着设置JTree对象的属性 是代码: DefaultMutableTreeNode root=new DefaultMutableTreeNode("信用卡系统"); DefaultMutableTreeNode bitchthing=new DefaultMutableTreeNode("查询"); root.add(bitchthing); bitchthing=new DefaultMutableTreeNode("存款"); root.add(bitchthing); jTree1=new JTree(root); jSplitPane1.add(jTree1,JSplitPane.LEFT); jTree1.addTreeSelectionListener(this); int mode=TreeSelectionMode1.SINGLE_TREE_SELECTION; jTree1.getSelectionMode1().setSelectionMode(mode); 代码应该没问题的啊。 可是添上代码就报告这样的错误呢。 "eventframe.java": Error #: 300 : class DefaultMutableTreeNode not found in class card.eventframe at line 37, column 5 "eventframe.java": Error #: 300 : class DefaultMutableTreeNode not found in class card.eventframe at line 37, column 37 "eventframe.java": Error #: 300 : class DefaultMutableTreeNode not found in class card.eventframe at line 38, column 1 "eventframe.java": Error #: 300 : class DefaultMutableTreeNode not found in class card.eventframe at line 38, column 39 "eventframe.java": Error #: 300 : class DefaultMutableTreeNode not found in class card.eventframe at line 40, column 17 "eventframe.java": Error #: 300 : method addTreeSelectionListener(card.eventframe) not found in class javax.swing.JTree at line 44, column 8 "eventframe.java": Error #: 300 : variable TreeSelectionMode1 not found in class card.eventframe at line 45, column 10 "eventframe.java": Error #: 300 : method getSelectionMode1() not found in class javax.swing.JTree at line 46, column 8 这个到底怎么了啊。。请高人指点啊。 |
2.Re:跪求!添上代码就出这样的错,急用。请路过的朋友帮忙看看啊。 [Re: nogod] | Copy to clipboard |
Posted by: bwpc Posted on: 2005-01-12 15:50 没把相应的包import进来吧, 如果我眼睛没看花的话," getSelectionMode1" 最后一个你写成数字1了而不是字母l 以后跪求什么的要贴个照片证明之,呵呵 |
3.Re:跪求!添上代码就出这样的错,急用。请路过的朋友帮忙看看啊。 [Re: nogod] | Copy to clipboard |
Posted by: billyzorro Posted on: 2005-01-13 14:37 不要这么搞笑哦,呵呵~~~ |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |