Please gothru the Sun tutorial and other java tutorials before doing something.I have corrected the code without exception.Proceed further and complete the code.Use loops.why this many if conditions?.U can simplify the code.Please gothru the correct code without exception.

Here's a good thread to preach the gospel of not using "this" as an ActionListener. i.e.,:

Java Code:

xxxx.addActionListener(this);

The number buttons can all share an ActionListener, and the operations buttons can share one, but they all shouldn't share the same single actionlistener. Create two inner classes that implement the ActionListener interface so that you can separate out that which should remain separate.