File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Netbeans: GUI background color issue, and image

 
Jay Orsaw
Ranch Hand
Posts: 356
Android Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • 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...?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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 Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • 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
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • 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 Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic