ここにJScrollPaneにJTextAreaにを追加した後:
scroll = new JScrollPane(display);
をあなたがやるように、他の容器に再度追加する必要はありません。
middlePanel.add(display);
だけコードの最後の行を削除し、正常に動作します。このように:
middlePanel=new JPanel();
middlePanel.setBorder(new TitledBorder(new EtchedBorder(), "Display Area"));
// create the middle panel components
display = new JTextArea(16, 58);
display.setEditable(false); // set textArea non-editable
scroll = new JScrollPane(display);
scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
//Add Textarea in to middle panel
middlePanel.add(scroll);
JScrollPaneには、その必要なときに、あなたのコンポーネントの周囲にスクロールバーを配置し、また、独自のレイアウトを持っているだけで、別の容器です。あなたは単にJScrollPaneのコンストラクタに渡しスクロールに何かをラップしたいときに実行する必要があるすべて:
new JScrollPane(myComponent)
または、このようなビュー設定:
JScrollPane pane = new JScrollPane();
pane.getViewport().setView (myComponent);
追加:ここ
をまだ動作していないので、完全に動作する例です:
public static void main (String[] args)
{
JPanel middlePanel = new JPanel();
middlePanel.setBorder (new TitledBorder (new EtchedBorder(), "Display Area"));
// create the middle panel components
JTextArea display = new JTextArea (16, 58);
display.setEditable (false); // set textArea non-editable
JScrollPane scroll = new JScrollPane (display);
scroll.setVerticalScrollBarPolicy (ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
//Add Textarea in to middle panel
middlePanel.add (scroll);
// My code
JFrame frame = new JFrame();
frame.add (middlePanel);
frame.pack();
frame.setLocationRelativeTo (null);
frame.setVisible (true);
}
そして、ここであなたが得るものです: 
の下に示されていますか? – talnicolas
データが消滅するだけです。 – Ravi
すぐに役立つように、[SSCCE](http://sscce.org/)を投稿してください。 –