Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I try to understand what you did here:</p> <pre><code>panel1.add(label1); panel1.add(comboBox); panel1.add(label2); panel1.add(text); // &lt;--- JFrame frame=new JFrame("Area Calculator Window");//create a JFrame to put combobox frame.setLayout(new FlowLayout()); //set layout frame.add(panel1); frame.add(text); // &lt;--- </code></pre> <p>Especially <code>frame.add(text);</code> and <code>panel1.add(text);</code>. Don't add text to <code>JFrame</code>. Use <code>JPanel</code>. </p> <p>Further, </p> <pre><code>public class AreaFrame3 extends Frame </code></pre> <p>Use <code>public class AreaFrame3 extends JFrame</code> so you don't need create additional JFrame: </p> <pre><code>JFrame frame=new JFrame("Area Calculator Window"); </code></pre> <p>Something like:</p> <pre><code>super.setLayout(new FlowLayout()); //set layout super.add(panel1); super.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); super.pack(); //set JFrame ssize super.setSize(400,250); //make JFrame visible. So we can see it super.setVisible(true); </code></pre> <p>At last Ill give you some tamplate to start with (that will help you):</p> <pre><code>public class FrameExmpl extends JFrame{ private static final long serialVersionUID = 1L; private JTabbedPane tabbedPane; private JPanel topPanel; private JTextField txtf_loadDS_; public static int valueInt = 0; // responsible for Task status updating public static Boolean isFinish = false; public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException{ UIManager.setLookAndFeel( "com.sun.java.swing.plaf.windows.WindowsLookAndFeel" ); FrameExmpl UI_L = new FrameExmpl(); UI_L.buildGUI(); UI_L.setVisible(true); } public void buildGUI(){ addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { dispose(); } }); setSize(435, 225); setLocation(285, 105); setResizable(false); topPanel = new JPanel(); topPanel.setLayout(new BorderLayout()); getContentPane().add(topPanel); txtf_loadDS_ = new JTextField(); txtf_loadDS_.setBounds(22, 22, 382, 25); topPanel.add(txtf_loadDS_); finishBuildGUI(); } public void finishBuildGUI(){ tabbedPane = new JTabbedPane(); topPanel.add(tabbedPane, BorderLayout.CENTER); } } </code></pre> <p><img src="https://i.stack.imgur.com/rQaHE.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload