Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Using Pictures with a ComboBox for my business need help

  1. #1
    Member
    Join Date
    Jun 2012
    Posts
    105
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default Using Pictures with a ComboBox for my business need help

    Hi,

    I got a program and I decided to update the program. One feature I was interested in was using a Combobox and having it change the pictures of the items I am selling. I was able to achieve this buy storing an array into the comboBox. Now as my business expands and I want to sell additional items I would like to add different pictures. The problem that I foresee is when I compile the program into a Jar file it seems to embed the picture file into the Jar file that is used to execute the program. Is it at all possible, to have it search a directory for the pictures when the files become Jar? Would that work in Theory? I can post my code if that seems like it will help.


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: Using Pictures with a ComboBox for my business need help

    Yes, it would certainly work. You could have a set-up file, and could use the command-line to tell your program where to look for the set up file. I've done this using JAXB and an XML set up file with some decent success.

Similar Threads

  1. Getting Pictures to Spin
    By usherlad in forum Java Theory & Questions
    Replies: 26
    Last Post: August 28th, 2012, 01:37 PM
  2. How Do i add pictures to a jframe?
    By Java Programmer in forum What's Wrong With My Code?
    Replies: 10
    Last Post: January 21st, 2012, 12:34 PM
  3. [SOLVED] Populating second combobox from a combobox help!
    By ComputerSaysNo in forum AWT / Java Swing
    Replies: 7
    Last Post: October 18th, 2011, 09:01 AM
  4. Importing gif/pictures
    By javanerd in forum Java Theory & Questions
    Replies: 2
    Last Post: October 31st, 2010, 11:58 PM
  5. How to animate pictures using JCreator?
    By bil_Imma in forum AWT / Java Swing
    Replies: 6
    Last Post: February 13th, 2009, 07:00 AM