Java Applet , JTable and Lotus Notes

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

Subject: Java Applet , JTable and Lotus Notes

Marco,

What version of Notes client are you trying to get this working for?

The reason I am asking: I have an applet that I built with Swing, as you are trying to do. It worked perfectly in R5 and was the centerpiece of an application that was running well in production. Then we upgraded to 6 and it’s been nothing but problems since then (I’ve since left the company, but they still have no resolution to some of the issues). It doesn’t render properly in 6 even though it does in R5 and through a browser. So that’s similar to the problem you are seeing where it’s good in eclipse, but not in Notes (I believe I also had focus problems as well). We tested this out with other, simpler Swing applets with similar results.

We went through a process to get some answers from IBM and was told that they changed JDKs from 5 to 6 and there were some issues with that. There is an SPR out for the issue we still don’t have resolution for. In the interim, you have to download the swing jar files to the client’s hard drive (swing.jar and swingall.jar) and then modify the Notes.ini to point to those jars, rather than using the default implementation within 6. It doesn’t take care of all the issues, but try it and I bet the focus problems will go away.