hi friends i'm not able to debug this code please tell me wht is wrong here...
Code:
import java.awt.*; import java.awt.event.*; import java.swing.*; class test extends JFrame implements ActionListener { JButton b1; JTextField Tf1; public test() { b1=new JButton("1"); Tf1=new TextField(10); setLayout(new Frlowlayout()); add(b1); add(Tf1); addActionListener(this); setSize(200,200); setVisible(true); } public void actionPerformed(ActionEvent e) if (e.getSource() == b1) { Tf1.setText("1"); } public static void main(String args[]) { test t=new test(); } }
Comment