Retrieve data from MongoDB collection into Swing JTable
I am a newbie in database projects. I don't know how to display a collection in mongodb inside a swing window (EDIT: JTable) after connecting it to the database server....plz help me out in this... I have tried doing this in sql but am not able to do using mongodb JButton btnDisplay = new JButton("display"); btnDisplay.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { // To connect to mongodb server MongoClient mongoClient = new MongoClient( "localhost" , 27017 ); // Now connect to your databases DB db = mongoClient.getDB( "test" ); System.out.println(