java如何在一个文本字段中显示整个数据库的详细信息
这是我的代码,但我不知道如何将整个表搜索结果放在一个文本字段中
private void btnSearchActionPerformed(java.awt.event.ActionEvent evt)
{
String SearchProduct ;
DBConnector dbcon = new DBConnector();//connecting to DB
dbcon.connect();//code for sql to select all from the table
if (dbcon.isProductExists) {
msg.showMessageDialog(this,"Search Successful","Search Status",1);
txtSearchResults.setText()
}
else {
msg.showMessageDialog(this,"no results found","Search Status",1);
}
}
可能吗?如果这是不可能的,你能提出其他建议吗
共 (0) 个答案