Clone JScrollPane

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gmioannou
    New Member
    • Dec 2007
    • 8

    #1

    Clone JScrollPane

    hi,

    can i clone JScrollPane or JPanel and its components?

    many thanks
    George Ioannou
  • BigDaddyLH
    Recognized Expert Top Contributor
    • Dec 2007
    • 1216

    #2
    Originally posted by gmioannou
    hi,

    can i clone JScrollPane or JPanel and its components?

    many thanks
    George Ioannou
    The way to answer this question is to examine the API:



    You will see that those components do not override Object's clone method, so that it is still protected, not public. This means you can't [edit!] use it directly.

    I would suggest you describe your problem better. What are you doing, what is your goal? I've never had to make a copy of a GUI component like that, so I'm wondering what's going on.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      ... on top of that you *can* move a component from one container to another, i.e.
      it will be automagically removed from the first container to the other. It's not cloning
      as BDLH already pointed out but maybe you can use that feature some day.

      kind regards,

      Jos

      ps. best wishes for 2008 all.

      Comment

      Working...