• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Background Image not Showing

 
Ollie Dee
Greenhorn
Posts: 10
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have wrote a menu which is for a college assignment and I cannot get my background image to display and I was trying to add an icon too, I have checked the web and have tried most of the help I found but it still does not work, can anybody help me with this please, i am using eclipse juno thank you, and how would I actually give the menu functionality, do I need to write the program again using Inheritance, I am very new to java.

 
Tony Docherty
Bartender
Posts: 2939
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and I cannot get my background image to display

What background image? I can't see any code that attempts to display one.

Check out this thread http://www.coderanch.com/t/601266/GUI/java/Repainting-JPanel-componentResized-event#2747070 on drawing an image on a panel.

and how would I actually give the menu functionality

You add Actions or ActionListeners to the menu items.
 
Ollie Dee
Greenhorn
Posts: 10
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I couldn't get a background image to work, but on line 16 I tried to import an image and it won't display, thanks for your reply..any ideas how I can import the image or even set it as my background?
 
Ollie Dee
Greenhorn
Posts: 10
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok thanks just seen your link.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic