• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Dynamic Filling up Jtable for Database

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am new to Jtable and experiencing a hard time to achieve following thing.

I have two pane One pane has the Search buttong and below it i have 2nd panel
which will hold the result.

I want to show the result in table ( due to my limited knowledge on swings, i can only think of showing in table as of now).
So i want to create the table at run time

I am trying following thing
1) i am trying with some hard code values but my table is not getting displayed in the panel
2) later i want to fill up my table with the rows fetch from Database

I am really struggling any help with code would be appreciated

 
Sheriff
Posts: 22821
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swing Is A Proper Noun. So please don't use swings anymore

Try repainting / revalidating the result panel after adding the scroll pane.


As for filling it with real data, use ResultSetMetaData. If you use the search you should be able to find the exact same problem in this forum, including some code that can help you out.
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rob,
You said:


Swing Is A Proper Noun. So please don't use swings anymore


A commonly occurring phenomenon, particularly amongst non-native English speakers although not necessarily limited to them, is the adoption of incorrect language.
Take for example use of the word "hoover" instead of vacuum cleaner.
It appears to me that for some reason in India java developers have adopted using the term "swings" when referring to java "Swing".
[Edited by Maneesh Godbole]
I realize this post is not really on topic and I hope that readers will tolerate the digression.

Cheers,
Avi.

[Reason for edit: Remove possible offending statement]
[ November 04, 2008: Message edited by: Maneesh Godbole ]
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Avi,

I can relate with you to a certain extent on the "Swings" issue.
However, your next statement was uncalled for.

Like you rightly quoted at the beginning of your post, having a non-English mother tongue has its own unique challenges. Everybody here at the ranch acknowledges and understands this issue.

So let us try and follow the "Be Nice" policy.
 
Avi Abrami
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maneesh,
Here in Israel everyone who uses PuTTY pronounces it "poo-tee". It's just a fact of life.
Pardon my ignorance, but please explain what part of my post was "not nice", so I will know not to repeat it.

Thanks,
Avi.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The part which I removed.
 
Avi Abrami
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maneesh,
I wonder how your actions would be interpreted in the reference of the USA's freedom of speech laws?

Cheers,
Avi.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you insist on continuing this, could you please start a new topic in this fourm?
After all the OP has a right to expect his thread to be related to his problem.
Thank you.
 
Avi Abrami
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maneesh,
Point taken, but I believe that this forum is definitely the more appropriate one. In fact, I would say that your suggestion is quite condascending.

Cheers,
Avi.
 
Rob Spoor
Sheriff
Posts: 22821
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And that's the end of this discussion. Anything not related to the initial problem will be removed. If you want to keep the discussion alive, please go to one of the forums mentioned before or use PM.
 
My, my, aren't you a big fella. Here, have a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic