JTable doesnt show columun names!
Hello. I'm trying to use JTable in my application and at the same time using tabbes to switch between my different JPanels. And within one of them panels i've got a JTable showing but it doesn't show the columun names of the cells! I'm really stuck in the mud :-(. This is my code:
public class EditPanel extends MainPanel { //inherit MainPanel
JPanel editPane;
final JTable table;
public EditPanel(){
String data[][] = {{"vinod","BCA","A"},{"Raju","MCA","b"},
{"Ranjan","MBA","c"},{"Rinku","BCA","d"}};
String col[] = {"Course","Grade"};
editPane = new JPanel();
table = new JTable(data,col);
tabs.addTab("Edit", editPane);
editPane.setLayout(new BorderLayout());
editPane.add(table, BorderLayout.SOUTH);
editPane.setOpaque(true);
}
}
Can anybody see where i'm going wrong please? Driving me nuts