This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Some demo with JTable with Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Some demo with JTable with Form" Watch "Some demo with JTable with Form" New topic
Author

Some demo with JTable with Form

Jiri Nejedly
Ranch Hand

Joined: Oct 22, 2002
Posts: 81
I seek some swing example/demo, which would show me data from simple database table in JTable interconnected with editable form (preferably on the same panel). Form should browse rows by First/Prev/Next/Last buttons. Form or (and) JTable should be able to insert a new record and delete one.

I found many JTable examples, but I didn't found any with form.

Thanks in advance for any tips.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

What do you mean by Form?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jiri Nejedly
Ranch Hand

Joined: Oct 22, 2002
Posts: 81
Set of editable fields, which represent one database row (each db (JTable) column has its own field).
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

I still dont really understand what you mean by Form. From what I gathered of your requirement, what you require is
1) Paginated table
2) Data to be loaded from the DB
3) Currently displayed data should be editable
4) New data creation.

Is this correct?
Jiri Nejedly
Ranch Hand

Joined: Oct 22, 2002
Posts: 81
OK Let's say so.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

OK Let's say so.

Huh? You can't say if the requirements I identified are correct or not?


Jiri Nejedly
Ranch Hand

Joined: Oct 22, 2002
Posts: 81
I finally found some picture , which shows what I need:



Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

That helps clarify the requirement.
So what have you got so far and where are you stuck?
Jiri Nejedly
Ranch Hand

Joined: Oct 22, 2002
Posts: 81
I am able to code all what I need. But I feel, that I dont't need to define every button's event etc... That I can save some time and work, that some basic behaviour can be generated automatically by few clicks in my development environment (JDeveloper).
Some years ago we did something similar with Struts/ADF. The difference was, that web application was made and table and form were separated on their own respecive pages.

So I seek some tutorial/demo/example which shows me, how to generate simple swing aplication from database table.
Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
ADF/JDeveloper can be used with Swing: http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADF_Swing_Overview/SwingOverview.htm . The other GUI builders (Windowbuilder, Netbeans) do support bindings so the work is not that hard, you don't need to write event listeners by hand (at least for the edit fields) - in fact, I think with the customization needed nearly every time it easier to build this from scratch.

Asking for JTable is a little too low level in your case; JTable is only the base component for the table part. If you are searching, try "swing master detail view".
 
wood burning stoves
 
subject: Some demo with JTable with Form
 
Similar Threads
jtable
Extending JTable
JTable
JTable
JTable