repaint JPanel with every click at JList

后端 未结 2 1135
遥遥无期
遥遥无期 2021-01-25 17:40

everytime i click on a JList item, i need to clear + refresh my current panel & load another panel, returned via method \'populateWithButtons()\'. temp is an int variable th

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-25 18:11

    move validate() and repaint() after adding to contentPane as in that point it will be redrawed.

提交回复
热议问题