Method Calls without using flags
<p>I have a method that I want to call from two different places on the same class where in one it calls a dialog normally and on the other it calls the dialog with one disabled field on it.</p>

<p>I know that passing a flag on the call and making the test inside the method works but is there a more optmized way of doing it?
Is there any way to inside the method knowing where the call happened?</p>

<p>edit:</p>

<pre><code>   // The part where you call the method passing a flag.
   showItemCustomDialog(true);
   showItemCustomDialog(false);

   // The dialog
   public void showItemCustomDialog(boolean flag) { 
       customDialog = new Dialog(this));
       field.setEnabled(flag);
   }
</code></pre>

<p>Is that a good example?</p>
