title: how can we create a window frame in Android?
body: <p>I have created two window frame in JAVA using awt and swing package. My Java code is like:</p>
  
  <pre><code>import java.awt.*;
  import javax.swing.*;
  
  public class TopLevelWindow {
  
      private static void createWindow() {
          JFrame frame = new JFrame("Simple GUI");
  
          //frame.setDefaultCloseOperation(JFrame.EXIT_ON_ CLOSE); 
          JLabel textLabel = new JLabel("Hi Ans ",SwingConstants.CENTER);
          textLabel.setPreferredSize(new Dimension(300, 100));
          frame.getContentPane().add(textLabel, BorderLayout.CENTER);
  
          //Display the window. 
          frame.setLocationRelativeTo(null);
          frame.pack();
          frame.setVisible(true);
      }
      public static void main(String[] args) {
  
          createWindow();
          createWindow();
      }
  
  }
  </code></pre>
  
  <p>Now on executing my code I am getting two window like frame and switching between
  these two frames.</p>
  
  <p>The same thing I want it to do in Android means </p>
  
  <ol>
  <li>How to create a window like frame in Android.</li>
  <li>At a time two frames are there and we easily switch between frame.</li>
  </ol>
  
  <p>How do I proceed? Any guidance?</p>