The .add method appends components to the end of another component. I’m trying to prepend a component to the beginning of another component. How would I accomplish that?
The .add method appends components to the end of another component. I’m trying to
Share
I think you could use the add(Component, int) method, where the
intspecifies the insertion position. An insertion position of zero should do the trick to prepend a component.(I don’t know if this is the right approach though. Maybe a layout manager would be better.)