title: Java. GUI WindowBuilder scroll bar in text area doesn't work
body: <p>I don't know why my scroll bar in text area doesn't work. I found many solutions in internet, but no 1 helped for me.</p>
  
  <pre><code>textArea1 = new JTextArea();
  textArea1.setBounds(13, 28, 182, 199);
  panel.add(textArea1);
  
  JScrollBar scrollBar = new JScrollBar();
  scrollBar.setBounds(205, 1, 17, 242);
  panel.add(scrollBar);
  </code></pre>
  
  <p>I found that can't be Panel's layout Absolute, if I change It to Group layout the same.
  What's wrong? Could you help me? Thank you.</p>
  
  <p>UPDATED:</p>
  
  <pre><code>package lt.kvk.i3_2.kalasnikovas_stanislovas;
  
  import java.awt.EventQueue;
  
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import java.awt.BorderLayout;
  import javax.swing.JTextPane;
  import javax.swing.DropMode;
  import javax.swing.JFormattedTextField;
  import java.awt.Component;
  import javax.swing.Box;
  import java.awt.Dimension;
  import javax.swing.JTextField;
  import javax.swing.JTextArea;
  import javax.swing.UIManager;
  import javax.swing.JButton;
  import java.awt.event.ActionListener;
  import java.awt.event.ActionEvent;
  import java.awt.Toolkit;
  import javax.swing.JMenuBar;
  import javax.swing.JMenu;
  import javax.swing.GroupLayout;
  import javax.swing.GroupLayout.Alignment;
  import javax.swing.JMenuItem;
  import javax.swing.LayoutStyle.ComponentPlacement;
  import javax.swing.ImageIcon;
  import javax.swing.JDesktopPane;
  import java.awt.SystemColor;
  import java.awt.Font;
  import javax.swing.border.BevelBorder;
  import javax.swing.border.EtchedBorder;
  import javax.swing.JScrollBar;
  import java.awt.Color;
  import java.io.BufferedReader;
  import java.io.FileReader;
  import java.io.IOException;
  import java.util.Scanner;
  
  import javax.swing.JLabel;
  import javax.swing.JToolBar;
  
  public class KDVizualizuotas {
  
      private JFrame frmInformacijaApieMuzikos;
      private JTextField txtStilius;
      private JTextArea textArea1;
  
      /**
       * Launch the application.
       */
      public static void main(String[] args) {
          EventQueue.invokeLater(new Runnable() {
              public void run() {
                  try {
                      KDVizualizuotas window = new KDVizualizuotas();
                      window.frmInformacijaApieMuzikos.setVisible(true);
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
              }
          });
      }
  
      /**
       * Create the application.
       */
      public KDVizualizuotas() {
          initialize();
      }
  
      /**
       * Initialize the contents of the frame.
       */
      private void initialize() {
          frmInformacijaApieMuzikos = new JFrame();
          frmInformacijaApieMuzikos.setResizable(false);
          frmInformacijaApieMuzikos.setIconImage(Toolkit.getDefaultToolkit().getImage(KDVizualizuotas.class.getResource("/lt/kvk/i3_2/kalasnikovas_stanislovas/resources/Sidebar-Music-Blue-icon.png")));
          frmInformacijaApieMuzikos.setTitle("Muzikos stiliai");
          frmInformacijaApieMuzikos.setBounds(100, 100, 262, 368);
          frmInformacijaApieMuzikos.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  
          txtStilius = new JTextField();
          txtStilius.setBounds(10, 34, 128, 20);
          txtStilius.setColumns(10);
  
          JButton btnIekoti = new JButton("Ie\u0161koti");
          btnIekoti.setBounds(146, 36, 89, 19);
          btnIekoti.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent arg0) {
          //      textArea1.append(txtStilius.getText()+"\n");
          //      txtStilius.getText();
  
  
  
                   Scanner input = new Scanner(System.in);
                      try {
                          FileReader fr = new FileReader("src/lt/kvk/i3_2/kalasnikovas_stanislovas/Stiliai.txt");
                          BufferedReader br = new BufferedReader(fr);
                          String stiliuSarasas;
                          while((stiliuSarasas = br.readLine()) != null) {
                              System.out.println(stiliuSarasas);
                              textArea1.append(stiliuSarasas+"\n");
                              }
                          fr.close();
                          }
                      catch (IOException e) {
                          System.out.println("Error:" + e.toString());
                      }
  
  
  
  
  
              }
          });
  
          JPanel panel = new JPanel();
          panel.setBounds(10, 65, 224, 243);
          panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
          panel.setBackground(SystemColor.text);
  
          JLabel lblveskiteMuzikosStili = new JLabel("\u012Eveskite muzikos stili\u0173:");
          lblveskiteMuzikosStili.setBounds(10, 14, 222, 14);
          frmInformacijaApieMuzikos.getContentPane().setLayout(null);
          panel.setLayout(null);
          frmInformacijaApieMuzikos.getContentPane().add(panel);
  
  
          JLabel lblInformacijaApieMuzikos = new JLabel("Informacija apie muzikos stili\u0173:");
          lblInformacijaApieMuzikos.setBounds(12, 3, 190, 14);
          panel.add(lblInformacijaApieMuzikos);
  
          textArea1 = new JTextArea();
          textArea1.setBounds(13, 28, 182, 199);
          panel.add(textArea1);
  
          JScrollBar scrollBar = new JScrollBar();
          scrollBar.setBounds(205, 1, 17, 242);
          panel.add(scrollBar);
          frmInformacijaApieMuzikos.getContentPane().add(txtStilius);
          frmInformacijaApieMuzikos.getContentPane().add(btnIekoti);
          frmInformacijaApieMuzikos.getContentPane().add(lblveskiteMuzikosStili);
  
          JMenuBar menuBar = new JMenuBar();
          frmInformacijaApieMuzikos.setJMenuBar(menuBar);
  
          JMenu mnFile = new JMenu("File");
          menuBar.add(mnFile);
  
          JMenuItem mntmExit = new JMenuItem("Exit");
          mntmExit.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent arg0) {
                  System.exit(0);             
              }
  
          });
          mntmExit.setIcon(new ImageIcon(KDVizualizuotas.class.getResource("/lt/kvk/i3_2/kalasnikovas_stanislovas/resources/exitas.png")));
          mnFile.add(mntmExit);
  
          JMenu mnEdit = new JMenu("Edit");
          menuBar.add(mnEdit);
  
          JMenu mnHelp = new JMenu("Help");
          menuBar.add(mnHelp);
  
          JMenuItem mntmHelp = new JMenuItem("Help");
          mnHelp.add(mntmHelp);
  
          JMenu mnAbout = new JMenu("About");
          menuBar.add(mnAbout);
  
          JMenuItem mntmAbout = new JMenuItem("About");
          mntmAbout.setIcon(new ImageIcon(KDVizualizuotas.class.getResource("/lt/kvk/i3_2/kalasnikovas_stanislovas/resources/questionmark.png")));
          mnAbout.add(mntmAbout);
      }
  }
  </code></pre>