Results 1 to 7 of 7
- 03-23-2011, 08:06 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 8
- Rep Power
- 0
Problem in giving row header name in a JTable
Hi everyone, i have a problem in giving row header name to a JTable. My requirement is that....
name: raj raja rahul
dept: Chemical Mechanical Electrical
salary: 20000 21000 25000
I am maintaining a database table for this having the following fields.i could able to display using metadata like this....
name dept salary
raj Chemical 20000
raja Mechanical 21000
rahul Electrical 25000
Is it possible to show just as my requirements. i am still trying to get but still no sign of any success. i do not know whether i could explain it properly or not. Sorry for my english.
Can anyone help me to get out of my problem.
Thank you in advance.
- 03-23-2011, 11:00 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 339
- Rep Power
- 12
It's not clear to me exactly what the problem is, but the commonest problem with table headers is that they only appear automatically when the table is put into a scrollpane (see Adding A Table To A Container). If you put a table directly into a panel, the headers won't appear (although you can extract the table header and display it separately).
- 03-23-2011, 11:13 AM #3
Member
- Join Date
- Mar 2011
- Posts
- 8
- Rep Power
- 0
Sir, actually i could not able to give row headers separately. I am facing problem at this point only. From the database Can you provide a simple example explaining this. I have to give row headers separately, but the row values must have to be taken from the database only.
Thank you for your reply.
- 03-23-2011, 11:16 AM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 339
- Rep Power
- 12
I'm afraid I don't understand your difficulty.
- 03-23-2011, 11:25 AM #5
Member
- Join Date
- Mar 2011
- Posts
- 8
- Rep Power
- 0
Sorry sir, probably i could not able to explain my problem fully. Actually my question is that how to give row headers separately??? The column names should be taking from the database.
Now, I need to display all the values corresponding to a particular row and a particular column from the database and not hardcoded.
Whether i could explain you properly now?
Thank you for paying your attention.
- 03-23-2011, 11:39 AM #6
Check out camickr's Table from database/.
db
- 03-23-2011, 11:43 AM #7
Member
- Join Date
- Mar 2011
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
problem regarding giving value to string variable
By enggvijaysingh@gmail.com in forum Advanced JavaReplies: 3Last Post: 12-17-2010, 11:11 PM -
JTable with multiple Header
By bircastri in forum AWT / SwingReplies: 1Last Post: 11-15-2010, 12:26 PM -
DisplayTag Table header styling problem and paging
By selvi in forum Web FrameworksReplies: 0Last Post: 08-05-2010, 09:14 AM -
JTable column header sorting direction arrows and row selection on focus loss
By r00tb33r in forum AWT / SwingReplies: 1Last Post: 07-28-2010, 04:46 PM -
header of jtable
By bbq in forum AWT / SwingReplies: 1Last Post: 07-05-2007, 05:11 AM
Bookmarks