关于JScrollPane在JPanel中的布局改怎么做
  我在JScrollPane中添加了一个JTextArea  可是控制不了他在Panel中出现的位置和大小,setLocation和布局管理器的方法都不行,这个该怎么做到呢??
              
------解决方案--------------------贴上代码先。。
------解决方案--------------------setPreferredSize(Dimension preferredSize)设置此组件的首选大小
------解决方案--------------------想改变位置要改布局了
------解决方案--------------------你这应该没有设置布局管理器,所以Jframe默认使用默认布局管理器。
你在
	jSP.setLayout(null);
设置布局管理器为空,
直接设置控件的位置和大小
		JTextArea.setBounds(x, y, width, height);
------解决方案--------------------
怎么可能,我这边显示很正常啊,JSP和taContent 的位置和大小随便放,
class MyPanel extends JPanel{
//    JTextArea taText = new JTextArea(8,2);
    JTextArea taContent = new JTextArea(12,59);
    
    JScrollPane  jSP = new JScrollPane(taContent);
    
    
    Font f = new Font("宋体", Font.BOLD, 20);
     
    public MyPanel(){
    	setLayout(null);
    	
        jSP.setBounds(5, 5, 600, 300);
        jSP.setOpaque(false);
        jSP.getViewport().setOpaque(false);
        jSP.setLocation(7, 7);
        this.add(jSP);
        //taContent.setLocation(100, 200);
        taContent.setLineWrap(true);