title: How can I make Eclipse WindowBuilder parse an inherited JFrame?
body: <p>I have a class BaseWindow with a JFrame mainFrame, and a bunch of methods that work on mainFrame. Actual windows in my app are made by extending BaseWindow. </p>
  
  <p>The class extending BaseWindow inherits mainFrame, and that somehow prevents window builder from "seeing" it when it parses the code. All I see in window builder's design tab is an empty window, but when I run the code everything works fine. </p>
  
  <p>How can I make this approach work with window builder, or "trick" window builder into parsing mainFrame? Here is an example class extending BaseWindow:</p>
  
  <pre><code>package GUIApp;
  
  //took out the imports to save space
  
  class SampleWindowOne extends BaseWindow{
  
  
      public JLabel txtSampleText;
      public JButton btnMagicButton;
  
      public SampleWindowOne() {
          initialize();
      }
  
      public void run(){
          mainFrame.setBounds(getCenteredBounds());
          mainFrame.setVisible(true);
      }
  
      private void initialize() {
  
          mainFrame = new JFrame();
          mainFrame.setBounds(100,100,700,525);
          mainFrame.setTitle("Sample Window One");
          mainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
          mainFrame.getContentPane().setLayout(null);
  
          txtSampleText = new JLabel();
          txtSampleText.setFont(new Font("Dialog", Font.PLAIN, 25));
          txtSampleText.setHorizontalAlignment(SwingConstants.CENTER);
          txtSampleText.setText("Sample Window");
          txtSampleText.setBounds(12, 50, 674, 51);
          mainFrame.getContentPane().add(txtSampleText);
  
          JTextArea txtrLoremIpsumDolor = new JTextArea();
          txtrLoremIpsumDolor.setEditable(false);
          txtrLoremIpsumDolor.setFont(new Font("Dialog", Font.PLAIN, 16));
          txtrLoremIpsumDolor.setForeground(Color.DARK_GRAY);
          txtrLoremIpsumDolor.setWrapStyleWord(true);
          txtrLoremIpsumDolor.setLineWrap(true);
          txtrLoremIpsumDolor.setText("Lorem ipsum dolor sit amet...");
          txtrLoremIpsumDolor.setBounds(57, 131, 609, 296);
          mainFrame.getContentPane().add(txtrLoremIpsumDolor);
  
          btnMagicButton = new JButton("End Program");
          btnMagicButton.setEnabled(false);
          btnMagicButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent arg0) {
                  requestTerminate();
              }
          });
          btnMagicButton.setBounds(257, 451, 175, 25);
          mainFrame.getContentPane().add(btnMagicButton);
  
      }
  }
  </code></pre>