It is the Graphical User Interface (GUI) Calculator written in Java with the help of swing and awt components. With this calculator, we can perform arithmetic operations on numbers like addition, subtraction, multiplication, division, square, etc. Also we have a currency converter with this calculator. In currency converter we can convert our Indian currency Rupee to some other currencies.
Java Swing is a part of Java Foundation Classes (JFC) that is used to create window-based applications. It is built on the top of AWT (Abstract Windowing Toolkit) package and entirely written in java. javax.swing components are platform-independent or lightweight components i.e. its components doesn't depends on the resources of the OS (Operating System).
javax.swing package provides classes such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc.
AWT stands for Abstract Window Toolkit. In Java, AWT is a package used to develop GUI or window-based applications in java.
But java.awt components are platform-dependent i.e. components are displayed according to the view of operating system. AWT components are heavyweight i.e. its components depends on the resources of OS (Operating System).
java.awt package provides classes such as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List etc.
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JTextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import java.awt.Font;
import javax.swing.JLabel;
import javax.swing.JComboBox;
import javax.swing.SwingConstants;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.DefaultComboBoxModel;Using the calculator is much simpler because we have to use the graphical components like buttons, drop down menus, main menu, etc.




