Create a JAVA applet program that accepts and displays object‟s details on respective GUI components. The Applet consists of seven GUI components such as two labels Name and Price followed by two textfields of size 10 respectively. There are two buttons labeled as ADD and DISPLAY followed by a Textarea. The values entered by the user on the text fields are that of two instance variables of a class with name Fruit and the individual object details are to be stored on an array of type Fruit upon the pressing of ADD button. Users are allowed to add 5 object‟s details and while pressing the DISPLAY button, the values of all the five objects are displaying on the Text Area.
Note: Fruit class should be created with two instance variables and a constructor to initialize the values. Use comments to illustrate the various concepts applied / utilized in the solution.