> Hi everyone,
>
> You see i have some embedded JComponents in a JTextPane, now
> what i want i want to do is remove the embedded components and then add
> them back to their original location(i.e where i got them from in the
> first palce)
[snip]
> //The below part seems to be wrong as the
> //JComponent is not added at the correct places.
> TextPane1.add(Label1);
My guess here is that some layouts are sensitive to the order in which
you add components, and others are not. I don't know what the default
layout for a JTextPane is, but it might be FlowLayout, in which case
a call to add() will always plop the component into the next spot to
the right of whatever else is already there.
You might have more luck with a layout in which you have more control,
like (much as I hate it) GridBagLayout.

Signature
monique
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html