When I click on the button that activates the file chooser, and add the resulting file the panel color disappears. Does anyone know why this is happening?
import
This is not an appropriate use of updateUI()
, which "Resets the UI property to a value from the current look and feel." It's not clear why you invoke the method, but it may cause the color change you observe. Start by deleting the line. Failing that, please edit your question to include an sscce that exhibits the problem you describe.
Also consider using a non-null
layout manager.