Panel losing color

后端 未结 2 1871
自闭症患者
自闭症患者 2021-01-29 07:34

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         


        
2条回答
  •  無奈伤痛
    2021-01-29 07:58

    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.

提交回复
热议问题