• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Pass Refresh a JPanel on Action Performed  RSS feed

 
Himanshu sGarg
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a JFrame and two JPanels to the frame.

In one panel, I have created browse and upload buttons in order to select a image and in another panel, I want to display the image selected in the other panel.

How can I achieve this.
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give the second panel a setter for the image (or file). Give the first panel a reference to the second. Call this setter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!