I need help in Java.
Having worked with VB.NET you can understand my predicament below. I am new to Java GUI. I have created a swing form with buttons, Add, Edit, Save. When Add is clicked, I want to set status to TRUE for some global variable (e.g isAdding) and set the same to FALSE when I click Edit button. This is to make me make a decision to call an insert sql script or an Update sql script.
The question is, I am fumbling with constructors and encapsulation and the like to do this. How can I achieve this, very easily as outlined above?