I have a JPanel inside of a JScrollPane that contains objects when you click the add button and deletes them when you click the delete button. Doing an add updates the screen, but a delete does not. Can anyone figure out what's going on?
First I remove the last item from the panel.. DOH!! Ok, I need to remove the component not the index-based component.
Then I check to see if the list has any items left in it. If it does, I modify the constraints, then remove and re-add the component with the new constraints. When jScrollPane.revalidate() is called, the screen is not repainted.
Ah, thank you! That works nicely. Even after pouring over a lot of tutorials and javadocs, I still can't find the correct times to use repaint(), validate(), invalidate(), and revalidate()...does anyone know of a good resource that explains this in an easy to understand way?