如何根据Java中JComboBox中的字符串从ms访问中获取数据? [英] How to fetch data from ms access according to string in JComboBox in Java?
本文介绍了如何根据Java中JComboBox中的字符串从ms访问中获取数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在用Java创建一个像WordWeb这样的项目,在该项目中,用户可以在JComboBox中输入一个单词,并根据该记录将从数据库中获取(MS Access).
我不知道如何使用ActionListener类或其方法.
请给我一些建议.
Hello Everyone,
I m creating a Project like WordWeb in Java in which user can enter one word in JComboBox and according to that record will be fetched from database(MS Access).
I dont know how to use ActionListener class or its methods.
Please give me some suggestions.
推荐答案
我想一个小的Google搜索可能对您有帮助...
同时,请看一下: http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html [ ^ ]
以及: http://developers.sun.com/product/jdbc/drivers [
I guess that a small google search could have helped you...
Meanwhile, take a look at this: http://docs.oracle.com/javase/tutorial/uiswing/events/actionlistener.html[^]
and this: http://developers.sun.com/product/jdbc/drivers[^]
Good luck.
^ ]
在这里阅读-您的代码也一样.
不管是RadioButton组还是组合框,Actionlistener Thingy都是相同的.
我建议直接创建一个类似"DatabaseService"的类,以处理数据库上的所有读/写/更改.
i have done half of the codes but i am not sure how to do the rest need help urgent[^]
Read here - same goes for your code.
It doesn''t matter if it''s a RadioButton Group or a combobox, the Actionlistener Thingy is the same.
I would suggest to directly make some Class like "DatabaseService" where all read/write/change on the database is handled.
这篇关于如何根据Java中JComboBox中的字符串从ms访问中获取数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文