如何纠正java中的以下错误 [英] how to correct the following errors in java

查看:95
本文介绍了如何纠正java中的以下错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从sql检索数据时发生以下错误。给出合适的解决方案,将数据检索到jtable



while retrieve data from sql occurs the following errors. give the proper solution to retrieve the data to the jtable

E:\indu\Datatran.java:84: cannot find symbol
symbol  : variable addElement
location: class java.util.Vector<java.lang.String>
columns_name.addElement=rsmeta.getColumnName(i);
            ^
E:\indu\Datatran.java:86: cannot find symbol
symbol  : method ColumnsIdentifiers(java.util.Vector<java.lang.String>)
location: class javax.swing.table.DefaultTableModel
dtm.ColumnsIdentifiers(columns_name);
   ^
2 errors

Tool completed with exit code 1

推荐答案

look在您的代码中调用Datatran第84/86行。有错误。

您可以在IDE的首选项中激活行号。



http://docs.oracle.com/javase/tutorial/uiswing/components/table.html [ ^ ]



直接建议我们需要一些代码片段和一些调试输出。
look at your code in the calls "Datatran" line 84/86. there are errors.
You can activate line numbers in the preferences of your IDE.

http://docs.oracle.com/javase/tutorial/uiswing/components/table.html[^]

for direct advice we would need some code snippets and some debug output.


这篇关于如何纠正java中的以下错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆