JComponent是一个抽象类啊.你生成的只能是JComponent的子类.
你到底想生成什么JComponent?

解决方案 »

  1.   

    就是想生成一个对应于我传过来的控件的新实例,比如再生成个新的JButton,但是我又不想判断它到底是哪一个控件
      

  2.   

    Component c;
    c=new JButton();比如上面,我现在怎么用c生成一个新的JButton 
      

  3.   

    没搞懂你上面写的意思
    Component c;
    c=new JButton();并且并不知道是JButton,而是要生成一个新的c引用的那个对象
      

  4.   

    JComponent没有实现clonable, 看来你要用序列化了.
      

  5.   

    JComponent jc=new JButton();
    jc=Other JCompontent's Handl;
      

  6.   

    007JavaKing(断点) :
    JComponent jc=new JButton();
    jc=Other JCompontent's Handl;我是想通过JC再生成一个新的BUTTON,我想你写这个不是我说的意思吧