Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Unable to select JTable rows??
Unable to select JTable rows?? [message #447138] Thu, 09 December 2004 01:34
Eclipse UserFriend
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
Previous Topic:how to detect a child dialog is closed?
Next Topic:displaying HTML in dialog
Goto Forum:
  


Current Time: Fri Apr 26 05:48:29 GMT 2024

Powered by FUDForum. Page generated in 0.02680 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top