JScrollPane 질문이요
희미한눈물
jta2의 데이터가 많아지면
Scroll이 생성되게 하려는데요
JScrollPane jsp = new JScrollPane(jta2);
를해도 스크롤이 보이지 않더라구요
어떻게해야하죠
---
public class ReportFrame extends JFrame implements ActionListener{
private BasicStatistics []infrExl = new BasicStatistics[26];
private int cnt;
private Dimension dimen, dimen1;
private int xpos, ypos;
private JRootPane jrp;
private Container con;
private JDesktopPane jdp = new JDesktopPane();
private JTextArea jta1 = new JTextArea(===========\n기초 통계량\n===========);
private JTextArea jta2 = new JTextArea( +
---------------------------- +
\n전체자료수 = +
\n결측값제외 자료수= +
\n결측값수(missing)= +
\n평균(mean)= +
\n합(sum)= +
\n중앙값(mediain)= +
\n최빈값(mode)= +
\n\n(n공식) +
\n분산(variance)= +
\n표준편차(std dev)= +
\n표준오차(std err)= +
\n변이계수(C.V.)= +
\n\n(n-1공식) +
\n분산(variance)= +
\n표준편차(std dev)= +
\n표준오차(std err)= +
\n변이계수(C.V.)= +
\n\n왜도(skewness)= +
\n왜도의 표준오차= +
\n첨도(kurtosis)= +
\n첨도의 표준오차= +
\n범위(range)= +
\n최소값(min)= +
\n최대값(max)= +
\n사분위범위(IQR)= +
\n일사분위수(Q1)= +
\n삼사분위수(Q3)=);
//private JScrollPane jsp = new JScrollPane();
public ReportFrame(BasicStatistics []aInfrExl, int cnt){
super(기초 통계 분석);// 프레임 제목
int i;
for(i=0; icnt; i++){
infrExl[i] = new BasicStatistics();
infrExl[i] = aInfrExl[i];
}
jrp = this.getRootPane();
con = jrp.getContentPane();
con.setLayout(new BorderLayout());
this.init();// init Method 호출
this.event();// event Method 호출
this.setSize(600, 700);// 현재 프레임 화면 크기 지정
dimen = Toolkit.getDefaultToolkit().getScreenSize();
dimen1 = this.getSize();
xpos = (int)(dimen.getWidth()/2 - dimen1.getWidth()/2);
ypos = (int)(dimen.getHeight()/2 - dimen1.getHeight()/2);
this.setLocation(xpos, ypos);// 현재 프레임의 중앙 배치
this.setVisible(true);// 현재 프레임을 화면상에 나타나게 함
}
private void init(){
this.setLayout(null);
con.setBackground(Color.white);
jta1.setBounds(150, 20, 200, 100);
jta1.setFont(new Font(굴림체,Font.BOLD,30));
jta2.setBounds(10, 150, 200 ,1000);
this.setResizable(false);
}
private void event(){
}
public void actionPerformed(ActionEvent e){
}
-
데빌의눈물
this.add(jsp); 이렇게요?
안되는데..;; -
소라
add 시켜주세요