I want to display a list of components graphically across the screen in a row. I’m currently attempting to do this with the Grid Bag Layout manager. Additonally, the button to create a new component is just another component and is also included in the row. However, I want the button to always be the right most component. I’ve illustrated what I mean in the mock-ups below.
The example above is before a component was added, and the example below is after.
The only solution I can see is to manually remove and re-add the Creation button every time a component is added, but I’d like to find a more elegant way of fixing this than that.