String[] i2ColumnNames = {"Sr. No."
"Head ID",
"Name",
"Category",
"Financial Year",
"Debit",
"Credit"};
Asked
Active
Viewed 74 times
1

Daniel F. Thornton
- 3,687
- 2
- 28
- 41

Toms
- 239
- 1
- 5
- 15
-
post the full code to get help. – Salah Feb 23 '14 at 15:42
-
Take a look at http://stackoverflow.com/questions/2320812/jtable-wont-show-column-headers – Ashwinee K Jha Feb 23 '14 at 15:45
1 Answers
3
Here:
i2t1sp1 = new JScrollPane(i2Table1);
layout.row().left().add(i2Table1);
You need to replace this line:
layout.row().left().add(i2Table1);
by this one:
layout.row().left().add(i2t1sp1);
You're not adding the scroll pane but the table directly to the layout.
Off topic
Always follow Java Code Conventions. Variables must have meaningful names.

dic19
- 17,821
- 6
- 40
- 69
-
1i2t1sp1 = internal frame 2.. table 1... scrollpane1. Thanks for the info. it worked and 1 more question.. is there any code to change the view of the internal frames. they look lame. – Toms Feb 23 '14 at 16:05
-
-
hehe.. dic. I am doing my final year project. Can the designs of internal frames be changed? If you have time, please can you go through my way of coding and suggest improvements on my style of coding. i am just a newbie, if you can put ur email id here, i will mail u the code. – Toms Feb 23 '14 at 17:23
-
All swing components "look" depends on the [Look and Feel](http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/) (see the link for more details). Java has a default cross-platform L&F also called Metal, and yes, internal frames look pretty bad. My best advice is please start using an IDE such as [Eclipse](https://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/keplersr1) or [NetBeans](https://netbeans.org/downloads/). Your coding style isn't bad, you just need to keep in mind that anyone who reads your code must be able to understand it. See code conventions! @Toms – dic19 Feb 23 '14 at 19:09