//获取窗体根容器
Container
ct
=
this.getContentPane()
//创建文本域对象
JTextArea
showInfo
=
new
JTextArea()
//创建滚动板对象,并把文本域添加到滚动面板中
JScrollPane
scroll
=
new
JScrollPane(showInfo)
//添加组件到容器
ct.add(scroll)
//设置窗体尺寸和显示位置
this.setBounds(180,
100,
600,
500)
//设置窗体可见
this.setVisible(true)