スクロールを適用している別のパネルがあるメインパネルがあります。このパネルには2つのパネルが含まれています。
スクロールを適用すると、スクロールバーが表示されます。
問題は、ユーザー画面から部分的にデータを動的に追加するときです...データは画面に表示されますが、パネルを下にスクロールできず、スクロールバーの下のデータが正しく表示されません。
generalInformationPanel = new JPanel(new GridLayout(1, 1));
generalInformationPanel.setBounds(0, 0, 1050, 500);
generalInformationPanel.setBackground(Color.WHITE);
gd_GeneralInformationUpperPanel = new JPanel();
gd_GeneralInformationUpperPanel.setBounds(0, 0, 1050, 700);
gd_GeneralInformationUpperPanel.setLayout(null);
gd_GeneralInformationUpperPanel.setBackground(Color.WHITE);
js1 = new JScrollPane(gd_GeneralInformationUpperPanel,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
js1.setBounds(0, 0, 950, 450);
js1.setVisible(true);
generalInformationPanel.add(js1);
add(generalInformationPanel, BorderLayout.CENTER);