Unable to select JTable rows?? [message #447138] |
Thu, 09 December 2004 01:34 |
Eclipse User |
|
|
|
Originally posted by: something.hotmail.com
hi all,
The code below shows the layout of construction of JTable within eclipse
view.The problem is that i am able to select the rows of the Table before
loading it, but i am unable to select rows after loading the Table(loading
is done selecting a menuitem from the pulldown menu of the view).
can somebody help?????
/***************/
public void createPartControl(Composite parent) {
parent_comp = parent;
contributeToActionBars();
makeActions();
JTable_comp = new Composite(parent_comp , SWT.NO_BACKGROUND |
SWT.EMBEDDED);
Frame_JTable_AWT = SWT_AWT.new_Frame(JTable_comp);
Frame_JTable_AWT.setLayout(new BorderLayout());
awt_panel = new Panel();
awt_panel.setLayout(new GridLayout(1, 1));
int rowCount = 50000;
awt_panel.add(createRowTable(rowCount));
Frame_JTable_AWT.add(awt_panel);
}
public JScrollPane createRowTable(int row)
{
String[][] rowData = new String[row][6];
String[] columnNames = {"CPU-ID", "Event", "Time", "PID", "Entry
length", "Event Description"};
SwingTable = new JTable(rowData, columnNames);
awt_panel.action(ActionListener, jframeOfJTable);
SwingTable.setShowVerticalLines(true);
JScrollPane scrollTable = new JScrollPane(SwingTable);
return scrollTable;
}//end of createRowTab
|
|
|
Powered by
FUDForum. Page generated in 0.02680 seconds