Java GUI在选择后冻结

时间:2014-12-29 12:19:05

标签: java user-interface jpanel refresh freeze

我试图修改不是我写的代码。

我需要插入一个需要添加公寓的用户确认的Jpane。

public class InserireNuovoCondominio extends javax.swing.JFrame implements BaseBoundary, 
                                                                       WindowListener,
                                                                       TableModelListener {

private static final long serialVersionUID = 1L;

// Graphics variables declaration - do not modify
public javax.swing.JButton jButtonAnnulla;
public javax.swing.JButton jButtonConferma;
public javax.swing.JComboBox jComboBoxCom;
public javax.swing.JComboBox jComboBoxProv;
public javax.swing.JLabel jLabelCAP;
public javax.swing.JLabel jLabelComune;
public javax.swing.JLabel jLabelId;
public javax.swing.JLabel jLabelProv;
public javax.swing.JLabel jLabelSlash;
public javax.swing.JLabel jLabelVia;
public javax.swing.JTextField jTextFieldCAP;
public javax.swing.JTextField jTextFieldId;
public javax.swing.JTextField jTextFieldInterno;
public javax.swing.JTextField jTextFieldVia;
// End of graphics variables declaration

private UnitaImmobiliari unitaImmobiliari = new UnitaImmobiliari();
private DatiCondominio datiCondominio = new DatiCondominio();
private Millesimi tabellaGenerale = new Millesimi();

public DatiCondominio my_dati_gen = new DatiCondominio();

这个方法在这里:

    public InserireNuovoCondominio(){
    super();
    StatoCorrente = START;
    int risp = JOptionPane.showConfirmDialog(this,"Vuoi veramente inserire un nuovo Condominio",     "Conferma Inserimento Condominio", JOptionPane.YES_NO_OPTION);
    if(risp == JOptionPane.YES_OPTION){
    initComponents();
    }

}

如果我使用YES_OPTION回复,程序运行正常,但我真的不知道NO_Option中的内容,我做了几次尝试但程序冻结了,我需要重新启动Eclipse。

是否有刷新GUI的方法?

感谢您的帮助。 最好的问候。

0 个答案:

没有答案