Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 6736 invoked from network); 13 Nov 2007 03:03:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2007 03:03:37 -0000 Received: (qmail 25298 invoked by uid 500); 13 Nov 2007 03:03:24 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 25282 invoked by uid 500); 13 Nov 2007 03:03:24 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 25271 invoked by uid 99); 13 Nov 2007 03:03:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 19:03:24 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of phoenixhawk@gmail.com designates 64.233.184.239 as permitted sender) Received: from [64.233.184.239] (HELO wr-out-0506.google.com) (64.233.184.239) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 03:03:28 +0000 Received: by wr-out-0506.google.com with SMTP id c37so1978922wra for ; Mon, 12 Nov 2007 19:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=n2Aq9GEd2awEAiksHtC80ekzpqWLyI20MR9tcx8eIEQ=; b=U5risHyd+tsj3JwkVIqscTSfw5T7UfvnK38klo0O4oBAD8HRbohFhAqL+z67uT8tYAS7xkYXSPOjS7ZTq9aOmhF754VXqb0/YUsd9RWCkdJkfzIQauXR6GOopHM63FU75xJDvPCBG1M7coK/hgGDMU0oua5qUdcOXm2ZvPn2V4w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=slTAUOsUjRXG1ApSn71hMOAYnoDvTZ1ab79+vaY2/J/SYu50ICTFls3WmxYAmWhydCBW1jo/UtqC3A/l1MYuS078WTlGQ1JzREifnW4+FSz3niFJU4RBO1tTrn9CHuIl3C7QWu921yGe1orqiiH2oPrCaJHEpHMyhhKQRCR5BFk= Received: by 10.78.205.7 with SMTP id c7mr6231789hug.1194922986272; Mon, 12 Nov 2007 19:03:06 -0800 (PST) Received: by 10.78.204.19 with HTTP; Mon, 12 Nov 2007 19:03:06 -0800 (PST) Message-ID: <4de4ee8d0711121903j520eb494sea4977890846a46c@mail.gmail.com> Date: Tue, 13 Nov 2007 11:03:06 +0800 From: "Phoenix Hawk" To: user@cayenne.apache.org Subject: Populating JTable and JList with data MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9266_15793419.1194922986262" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9266_15793419.1194922986262 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi there... Background: using Cayenne 2.0.3 with NetBeans 5.5.1 (JDK 1.5) on Windows XP SP2... I have used the Cayenne Modeler to perform a reverse engineering on my existing database following the online tutorial. I am new to the java programming "model", previously I am doing C/C++, perl, php, tcl/tk, I have to pickup Java myself to do a prototype... My task is to read data from a MSSQL 2005 database and display it on a Java desktop application. There is no need to put any data back ( *whew* ) which is also why I did not want to use iBatis or Hibernate (they are too heavy, I feel)... :) I am stuck at how I can display the results of my query (which I am able to print on the debugging console using System.out.println) on the application. Does anyone have a code snippet or a link (I have looked at the Cayenne petstore, examples on the wiki, but none of them have what I want, or maybe I do not understand enough Java) that shows how the results of a query can be used to populate a JTable and a JList? Or maybe there is a better way instead of using JTable or JList? I would be very grateful for any advice or pointers... I think I'm at the limit of my learning capacity after 3 days of intensive searching/learning, my brains feel like they are not mine anymore... :P Thank you very much... :) pH ------=_Part_9266_15793419.1194922986262--