Hi guys,
JAVA applets are driving me crazy in notes.
I developed a java applet in eclipse with an configurable JTable in it. Everything worked in eclipse as an applet. After embedding the applet in a notes form, the focus is driving me crazy. Sometimes it works then afterwords it doesn’t work, what is wrong with the code.
What do I have to do in order to get it work ???
Additional Infos:
I added a focus listener to the table and the celleditors. It shows me that Lotus won’t fire some focus-events ( while tabbing the table the following events should be fired in the applet , “Table got focus”, “Table lost focus” , “JTextField got focus” , “JTextField lost focus” , “Table got focus”, “Table lost focus” , etc.)
The example I used is the following:
public class SimpleTable extends JApplet {
JTable table ;
TableModel dataModel = new AbstractTableModel() {
public int getColumnCount() { return 10; }
public int getRowCount() { return 10;}
public Object getValueAt(int row, int col) { return new Integer(row*col); }
public boolean isCellEditable ( int rowIndex, int columnIndex) {
if ( columnIndex % 2 == 0 ){ return true;} else {return false;}
}
};
public void init() {};
public void start() {
table = new JTable( dataModel);
table.setSelectionBackground (new Color (255 , 255 , 128)) ;
table.setSelectionForeground (new Color (255 , 0 , 0)) ;
table.setSelectionMode ( ListSelectionModel.SINGLE_SELECTION );
table.setRowSelectionAllowed(false);
table.setColumnSelectionAllowed(false);
table.setCellSelectionEnabled(true);
table.setAutoResizeMode ( JTable.AUTO_RESIZE_OFF );
table.setRowSelectionInterval( 0 , 0 );
getContentPane().add ( table );
table.requestFocus();
}
}
Any suggestions ?
Thanks
M. Weller