Show image by click JButton

后端 未结 3 1624
花落未央
花落未央 2020-12-12 02:39

I have a problem. I don\'t know how to display an image by clicking a JButton.

I have a class which can show and hide an image:

/**
 * 
 */
package          


        
3条回答
  •  借酒劲吻你
    2020-12-12 03:18

    You can simply add a JLable to show image on it. After this, you can setVisible JLabel depending on condition.

提交回复
热议问题