我試圖從填充我得到在Java中使用蒙戈驅動程序中的數據一個JTable來填充在Java中JTable中,這是我的代碼:如何使用蒙戈司機
Pattern pattern = Pattern.compile(".*"+textArea.getText()+".*", Pattern.CASE_INSENSITIVE);
BasicDBObject query = new BasicDBObject("content:encoded", pattern);
DBCursor cursor = blogTable.find(query);
while (cursor.hasNext())
{
chatArea.append("\n"+cursor.next().toString()); //I want to populate the jtable here instead of just appending in the JtextArea
}//End of while
我也不能投影場(S)我想,我的意思是我只需要一列(即冠軍),但我得到的結果中的所有列
請幫幫忙,
感謝
感謝它的工作原理,我知道我很貪心,但是你知道我怎麼能把結果投影到我在mongo查詢中得到的結果 – Snedden27
對不起,但爲此我幫不了你。 – alex2410