Board index » jbuilder » Problem with ActionListener in JDK 1.4
Knut Hovda
JBuilder Developer |
Problem with ActionListener in JDK 1.42003-07-29 08:45:47 PM jbuilder21 Hello, We are using a combobox (JdbNavComboBox from Borland dbswing library), and have a problem with the actionlistener for this cbx with JDK 1.4. With JDK 1.3, everything works fine, but with JRE 1.4 the action event is never triggered. We have tried with 1.4.1_01 and 1.4.1_02, but they both have the same problem. This problem only occurs with JdbNavComboBox. With JComboBox, the action listener works fine. The problem applies both for JBuilder4 and JBuilder9. The action listeners are defined like this: --- public class panWellDetails extends JPanel implements CommonInterface { JdbNavComboBox cbx1 = new JdbNavComboBox(); cbx1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { cbx1_actionPerformed(e); } }); cbx1.setColumnName("WELLNAME"); cbx1.setDataSet(qdsWellInfo); void cbx1_actionPerformed(ActionEvent e) { // Displayed with JRE 1.3, but not with JRE 1.4 System.out.println("Selected new item in cbx."); } } --- I've seen several postings on similar topics on the groups, but since this actually works fine with JDK 1.3, it seems this must be a bug in the Borland library, or in JDK 1.4. Can anyone confirm this? Regarding workarounds, I'm open to suggestions. I've seen many recommend using a NavigationListener on the DataSet instead of an actionlistener on the cbx. I've tried this, but then run into the problem that a simple selection in the cbx fires a number of navigation events, instead of just one. Any information shared on this is also welcome. In advance, thanks for your help! Regards, Knut Hovda ( XXXX@XXXXX.COM ) PTI Scandpower AS |