| Author |
Images don't painting
|
Daniel Lima
Greenhorn
Joined: Feb 12, 2010
Posts: 14
|
|
Hello!
This is my first post, and I need your help!
I'm trying to display five images, but I can't. I don't have any error message, any warning!
I have two classes:
Class 1:
Class 2:
I see the background, and the Strings, but no images :-(
Any help will be great!
Thank you in advance!
Daniel Lima
|
 |
Sharad Jadhav
Greenhorn
Joined: Feb 10, 2010
Posts: 18
|
|
# public void loadImages() {
# bgImage = loadImage("/images/background.jpg");
# opaqueImage = loadImage("/images/opaque.png");
# transparentImage = loadImage("/images/transparent.png");
# translucentImage = loadImage("/images/translucent.png");
# antiAliasedImage = loadImage("/images/antialiased.png");
# imagesLoaded = true;
# // signal to AWT to repaint this window
# repaint();
# }
Try using now. Hope this will help you
|
Java J2EE Hibernate Spring
|
 |
Daniel Lima
Greenhorn
Joined: Feb 12, 2010
Posts: 14
|
|
Hello Vijay Kakade !
Tnx for your reply!
This don't work. I've tryed...
I don't know what's happening.... I looked the code thousands of times!
Please try test this code in your computer...
Tnx in advance!
|
 |
Sharad Jadhav
Greenhorn
Joined: Feb 10, 2010
Posts: 18
|
|
|
Are all images in classpath? Put that in classpath It should display the images.
|
 |
Daniel Lima
Greenhorn
Joined: Feb 12, 2010
Posts: 14
|
|
Hey Vijay Kakade, tnx!
I'm newbe on J2SE...and I'm using eclipse ide.... how can I put this images in classpath?
|
 |
Daniel Lima
Greenhorn
Joined: Feb 12, 2010
Posts: 14
|
|
Add information:
I've edited the .classpath file, no success.
I've edited the run configurations, no succes.
|
 |
Daniel Lima
Greenhorn
Joined: Feb 12, 2010
Posts: 14
|
|
Hello!
More information!
if i do this:
It works!
But I think that I can't put the absolute path im my aplication...
|
 |
Daniel Lima
Greenhorn
Joined: Feb 12, 2010
Posts: 14
|
|
Resolved with:
|
 |
 |
|
|
subject: Images don't painting
|
|
|