Go to Netbeans and create New Java Application Project.
Create New Java Class Called "Model.java".I create Apple model inside it and create constructors and two methods to incrementApple and getvalueApple.
Then create New Java Class Called "View.java".I create simple JFrame and implement JButton and Jlabel inside it.You can see code and Output below.
Then Controller is most important part.I want to do when i press this button in View Apple value should increment by 1 and display in label.so that logic should implement inside controller.It connect Model and View.
Create ActionListner and with in that, create method LinkBandL( ) to increment apple value and display in label.
so The controller is responsible for intercepting and translating user input into actions to be performed by the model.
then Create Main class to Run this Application