• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Netbeans: GUI background color issue, and image

 
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all! I have 2 questions regarding netbeans. 1 is when I save my project containing pictures where do I put the pictures? Originally I had an "external picture" that wasn't shown when I built my Jar file. Now I have "imported to project" but still do not see it. Should I include a folder called images in the dist folder or what?

Also when trying to use the GUI Builder the default color is gray. I have tried to switch itt o all white, but does not work, why is this? Should I try custom code or what? I'm not sure why it doesn't chage... I am using Absolute Layer with a Frame.

Edit: I just added a Panel and can change the color, I'm guessing it's a Frame issue...?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer to number 1 depends on what type of project you're talking about and how you access the picture within your app. How a picture is shown in a web app via a URL is very different from how a picture would be accessed in a Java command line app using a classpath resource to access the picture.
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:The answer to number 1 depends on what type of project you're talking about and how you access the picture within your app. How a picture is shown in a web app via a URL is very different from how a picture would be accessed in a Java command line app using a classpath resource to access the picture.



The pictures are local, they aren't via a url. I want them to be included in the project.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assume that you answer means that you are not creating a web project. In that case place the image file into the proper package under Source Packages. (Exactly which package depends on how your code accesses the picture.) The image will be included in the JAR file.


(By the way. even in a web project the pictures are included in the project.)
 
Jay Orsaw
Ranch Hand
Posts: 356
Android Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes the "Import to project" places them in the source package. So these images will be included inside the JAR itself and I wont have to worry about including them elsewhere then? Thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic