public static JScrollPane getScrollPane(final JTextArea ta) {
    	int rows = ta.getRows();
    	if (rows < 1) {
    		rows = StringUtil.countLine(ta.getText());
    	}
    	int columns = ta.getColumns();
    	if (columns < 1) {
    		String longestLine = StringUtil.longestLine(ta.getText());
			if (longestLine != null) {
				columns = longestLine.length();
			} else {
				columns = 10;
			}
    	}
		return getScrollPane(ta, columns * 8, rows * 20);
	}