Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Why VE calls actionPreformed Listeners?
Why VE calls actionPreformed Listeners? [message #618418] Tue, 20 July 2010 06:02
Eclipse UserFriend
Originally posted by: fbondioli.autentiweb.com

Hi all,
I'm using eclipse 3.5.2 and VE 1.4 for design Swing applications.

I've noticed that VE often follows actionPerformed events linked to object and this produces very often unpredictable results.
For example in the code below, the method "inserisciNuovoCliente()" is called by the VE during setup and prevent it to display the frame correctly. If I comment
the call to inserisciNuovoCliente() the frame is displayed OK.

Is there a way to prevent this behaviour?

private JButton getBtInsNuovoCliente() {
if (btInsNuovoCliente == null) {
btInsNuovoCliente = new JButton();
btInsNuovoCliente.setText("Inserisci nuovo cliente");
btInsNuovoCliente.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
new Thread() {
public void run() {
inserisciNuovoCliente();
}
}.start();
}
});
}
return btInsNuovoCliente;
}

private void inserisciNuovoCliente() {
Anagrafica cli = new Anagrafica();
cli.setCliente(true);
FrameSchedaAnagrafica fsa = new FrameSchedaAnagrafica(cli);
UIUtils.showModalInternalFrame(fsa, StoreClientGlobal.desktopPane, this);
cli = fsa.getAnagObject();
if (cli.getId() != null) {
try {
ddtObject.setDestinatario(cli);
detailPanel.toControl(txtFornitore);
//txtFornitore.setBoundValue(cli);
} catch (Exception e) {
e.printStackTrace();
}
}
StoreClientGlobal.desktopPane.remove(fsa);
fsa.dispose();
}
Previous Topic:Please help me use VE
Next Topic:Why VE calls actionPreformed Listeners?
Goto Forum:
  


Current Time: Tue Mar 19 07:07:21 GMT 2024

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

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

Back to the top