@Override
	public void componentResized(ComponentEvent e) {
		// 根据panel自适应大小，调整scrollpane和textArea的位置
		scrollPane.setBounds(0, 0, this.getWidth(), this.getHeight());
		textArea.setSize(scrollPane.getSize());

		// 调整滚动条到随后
		textArea.selectAll();
		// 去掉全选效果
		textArea.setCaretPosition(textArea.getDocument().getLength());

		// JScrollBar bar = scrollPane.getVerticalScrollBar();
		// bar.setValue(bar.getMaximum());
		// scrollPane.getVerticalScrollBar().setValue(scrollPane.getVerticalScrollBar().getMaximum());

		// System.out.println("componentResized: bounds:" + this.getBounds() +
		// ", size=" + this.getSize());
		// System.out.println("textArea bounds=" + textArea.getBounds() +
		// ", caret pos=" + textArea.getCaretPosition());
		// System.out.println("scrollPane bounds=" + scrollPane.getBounds());
		// // System.out.println("bar pos=" + bar.getValue() + ", maxpos=" +
		// bar.getMaximum());
		// System.out.println("========");
	}