2011-03-16 14 views

cevap

21

EventHandling, ActionListener mı arıyorsunuz?

veya kodu?

JButton b = new JButton("Clear"); 
b.addActionListener(new ActionListener(){ 
    public void actionPerformed(ActionEvent e){ 
     textfield.setText(""); 
     //textfield.setText(null); //or use this 
    } 
}); 

Ayrıca önceki açıklamada bağlantılı sorunun cevabı en
How to Use Buttons

+0

Çok teşekkür ederim. – Monte