aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Background Image not Showing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Background Image not Showing" Watch "Background Image not Showing" New topic
Author

Background Image not Showing

Ollie Dee
Greenhorn

Joined: Jan 06, 2013
Posts: 10

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

Joined: Aug 07, 2007
Posts: 2280
    
  49
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

Joined: Jan 06, 2013
Posts: 10

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

Joined: Jan 06, 2013
Posts: 10

Ok thanks just seen your link.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Background Image not Showing