Re: Populating JTable and JList with data

From: Peter Karich (peatha..ahoo.de)
Date: Tue Nov 13 2007 - 02:58:31 EST

  • Next message: David Marko: "Cayenne 3.0M2 and EJBQLQuery"

    Phoenix Hawk schrieb:
    > 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?

    If you try to use netbeans 6.0 this could be another way for you:

    http://www.netbeans.org/kb/60/java/gui-db.html
    or the video:
    http://www.netbeans.org/download/flash/netbeans_6_gui_builder/netbeans_6_gui_builder.html

    But if you want to learn "how to query with cayenne", this would be more
    interesting for you:
    http://wiki.netbeans.org/wiki/view/TS_60_FormSimpleJTableDataBinding

    Peter.



    This archive was generated by hypermail 2.0.0 : Tue Nov 13 2007 - 02:52:42 EST