How can I change background image in JFrame using JButtons? -


i want change image background of jframe using button. know how use jframe , jbutton.

you should add following code in button action listener

setcontentpane(new jlabel(new imageicon("c:\\users\\computer\\downloads\\colorful design.png"))); 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -