Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying Splash Screen in NetBeans

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I've done a program to display the image. It is working perfectly in Texpad and when i tried to execute it in Netbeans, it is not displaying the image..

The code is given below.



Please help me to work it out..

Regards

Aravind Prasad
 
Jonathan Janisch
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just guessing without really looking at the code that it's not loading your image properly. When you run that particular code in NetBeans it expects to find the image in your project folder here:

build
dist
images\1.jpg <---
nbproject
src
test
build.xml
manifest.mf

Did you know that Java 6 has built in support for displaying splash screens?

http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/splashscreen/
[ August 14, 2007: Message edited by: Jonathan Janisch ]
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou very much sir..

the problem with me was only the image folder..
I put the image folder in src\images

When i put back in the root folder.. it is working fine.

Thank you very much for your help and support

cheers

Aravind Prasad
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,

When I use the above code and it is displaying well in the NetBeans and when i copy the dist folder and run it remotely, it is not working well. Please advise me how to bring the images when i run using

java - jar <filename>.jar

Thanks/Regards

Aravind Prasad
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you copy the image file as well? Make sure the images/1.jpg is in the same directory as the JAR file.
 
Gera Levi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are just missing a "/" before the name of your package to use it from that direction bro, try

"/PACKAGENAME/IMAGE"

NOTE: Dashes are used the regular ones, not the inverted "\"

Try it out
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gera, did you notice this thread was 2.5 years old? The topic starter hasn't been around for months.
 
Gera Levi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mmm yeah that's what I thought, haha but you never know, by the way does this splash screen code actually works? 'cause now I'm having a big headaque with a splashscreen with progress bar, I've seen so many codes and topics, but never got lucky
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic