Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- java.lang.IllegalArgumentException: Index out of bounds
- at org.eclipse.swt.SWT.error(Unknown Source)
- at org.eclipse.swt.SWT.error(Unknown Source)
- at org.eclipse.swt.SWT.error(Unknown Source)
- at org.eclipse.swt.widgets.Widget.error(Unknown Source)
- at org.eclipse.swt.widgets.Table.getItem(Unknown Source)
- at org.eclipse.wb.swt.FortryApplication$2.handleEvent(FortryApplication.java:138)
- at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
- at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
- at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
- at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
- at org.eclipse.wb.swt.FortryApplication.open(FortryApplication.java:72)
- at org.eclipse.wb.swt.FortryApplication.main(FortryApplication.java:741)
- table.addListener(SWT.Selection, new Listener()
- {
- @Override
- public void handleEvent(Event e) {
- Table table = (Table) e.widget;
- TableItem item = table.getItem(table.getSelectionIndex());
- if( e.detail == SWT.CHECK ) {
- System.out.println( "You checked " + e.item );
- if( table.indexOf( ( TableItem )e.item ) == table.getSelectionIndex() ) {
- TableItem ti = ( TableItem )e.item;
- ti.setChecked( !ti.getChecked() );
- }
- } else {
- TableItem ti = ( TableItem )e.item;
- ti.setChecked( !ti.getChecked() );
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement