title: What is best way to initializing GUI fields
body: <p>Example:</p>
  
  <pre><code>public class MyWindow extends Window {
  
      private final Panel panel = new Panel(new Layout());
      private final TextField textField = new TextField();
  
      private TextArea textArea;
      private String value;
  
      public MyWindow(String value) {
           this.value = value;
           setHeading("Example");
           textArea = createTextArea();
           panel.add(textArea);
           panel.add(textField);
           add(panel);
      }
  
      private TextArea createTextArea() {
           TextArea textArea = new TextArea();
           textArea.setValue(value);
           textArea.setToolTip("tooltip");
      }
  
  }
  </code></pre>
  
  <p>Keep eye on TextArea - What is bestway to initialize this field? Inline field initialization or default constructor?</p>
  
  <p>Should I do as above or maybe like this:</p>
  
  <pre><code>   public class MyWindow extends Window {
  
      ...
      private TextArea textArea = new TextArea();
      ...
  
      public MyWindow(String value) {
           ...
           setupTextArea();
           ...  
      }
  
      private TextArea setupTextArea() {
           textArea.setValue(value);
           textArea.setToolTip("tooltip");
      }
  
  }
  </code></pre>
  
  <p>I have many more fields to initializing and I can't always declare the field in one line. Sometimes the creation of a single item in the GUI needs to create two other objects. Therefore, the code becomes difficult to read - some fields are initialized in the constructor, and all rest in the declaration. It doesn't look too good in my opinion.</p>
  
  <p>How do you do it?</p>
  
  <p>EDIT: Maybe I have to create all fields in the constructor and pass all informations to methods as arguments?</p>