Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Displaying Splash Screen in NetBeans

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 22796
131
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic