Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying an image issue

 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have created a GUI with the menus "File" and "Help".

"File" has a menu item, "Open Image...".

I'm just having an issue DISPLAYING an image at the GUI.

I have my "Open Image..." menu item as follows:



And, the code that is responsible for displaying the image is:




And, finally the code that displays the creates and shows the GUI is as follows:




Thanks.

 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where do you add the picturePanel?

don't use paint() with swing components - use paintComponent()

 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Dunn wrote:where do you add the picturePanel?

don't use paint() with swing components - use paintComponent()



Yes, exactly, this is the case.

How do I add the "PicturePanel" to my GUI? This is the the problem I'm facing.

Thanks.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deleted

I see I've just wasted my time repeating what was already posted here

http://forums.sun.com/thread.jspa?threadID=5425648&tstart=0

another added to the ignore list
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abder-Rahman Ali, please BeForthrightWhenCrossPostingToOtherSites
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic