title: How to style in java swing?
body: <p>I`m very new to Java and I want to create a program and I already have some problems styling it. I want a simple program with the following structure:</p>
  
  <p>The first line should be the menubar with file and about buttons.
  In the second line I should have a text: "url: ", a text input (for the url) and a "go" button after the text input.
  On the third line I need a tabbed menu with 3 tabs: tab1, tab2, tab3.</p>
  
  <p>The rest of the content until the bottom of the window should be a table with rows and columns and it should have vertical and horizontal scroll bars if the content is too big and if the window is bigger than the table than it should fill the entire window.</p>
  
  <p>For now I have only this code:</p>
  
  <p>main.java :</p>
  
  <pre><code>import javax.swing.*;
  
  public class main {
  
      public static void main(String args[]){
  
          JFrame frame = new JFrame("SEO Tool");      
          frame.setSize(500,300);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
          frame.setVisible(true);
  
          menubar menubar = new menubar(); 
          menubar.createmenubar_site(frame);
  
          tabs tabs = new tabs();
          tabs.createtabs(frame); 
      }
  }
  </code></pre>
  
  <p>tabs.java :</p>
  
  <pre><code>import javax.swing.*;
  import javax.swing.BoxLayout;
  
  public class tabs {
  
      public void createtabs(JFrame frame){
  
          JLabel sitelabel = new JLabel("A");
  
          JPanel sitepanel = new JPanel();
          sitepanel.setLayout(new BoxLayout(sitepanel, BoxLayout.X_AXIS));
          sitepanel.setSize(400,400);
          sitepanel.add(sitelabel);
          frame.add(sitepanel);
  
          JPanel panel = new JPanel();
          panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
          //panel.setBounds();
          frame.add(panel);
  
          JTabbedPane tabs = new JTabbedPane();
  
          JPanel yoursite = new JPanel();
          JPanel yourcompetitors = new JPanel();
  
          tabs.addTab("Your site",yoursite);
          tabs.addTab("Your competitors",yourcompetitors);
  
          panel.add(tabs);        
  
          sitetab sitetab = new sitetab();
          sitetab.createcontent(yoursite);    
      }
  }
  </code></pre>
  
  <p>menubar.java :</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  import java.awt.event.*;
  
  public class menubar {
  
      public void createmenubar_site(JFrame frame){
  
          JMenuBar menubar = new JMenuBar();
          frame.setJMenuBar(menubar);
  
          JMenu file = new JMenu("File");
          menubar.add(file);
  
          JMenuItem newproject = new JMenuItem("New Project");
          newproject .addActionListener(new click_newproject());
          file.add(newproject);
      }
  
      static class click_newproject implements ActionListener {
  
          public void actionPerformed (ActionEvent e){            
          }
      }
  }
  </code></pre>