Friends what is the Error below program and how i debug this - TopicsExpress



          

Friends what is the Error below program and how i debug this error: import javax.swing.*; import java.awt.*; import java.awt.event.*; class Addtion implements ActionListener { JFrame jf; JTextField f1,f2,f3; JButton b1; int a,b; Addtion() { jf=new JFrame(Addition); f1=new JTextField(); f2=new JTextField(); f3=new JTextField(); b1=new JButton(Click); f1.setBounds(10,10,100,50); f2.setBounds(150,10,100,50); f3.setBounds(250,10,100,50); b1.setBounds(120,100,100,50); b1.setForeground(Color.red); b1.addActionListener(this); jf.add(f1);jf.add(f2);jf.add(f3);jf.add(b1); jf.setLayout(null); jf.setSize(800,500); jf.setVisible(true); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) f3.setText(Integer.parseInt(f1.getText())+Integer.parseInt(f2.getText())); } public static void main(String args[]) { new Addtion(); } }
Posted on: Mon, 08 Dec 2014 08:30:58 +0000

Trending Topics



Recently Viewed Topics




© 2015