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 4 of 4

Thread: Use Image in a java Class

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    5
    My Mood
    Cheerful
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Use Image in a java Class

    hi everyone..............

    I have a problem, need some help. please........................!!!

    I am doing a project "online election system" client-server base application.

    I have a party registration class in my program. and I have a party registration form in which I want to upload a image(Poll Symbol) for newly register party. but I don't know how to do this.?
    Anyone please help its urgent.? please................
    Born to learn


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Use Image in a java Class

    You will have to send it from point a to point b in a format point b can understand.
    What have you done so far and what is your question?

  3. #3
    Junior Member
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Use Image in a java Class

    From what I gather, you need to store the directory of the image into a string. Then when you want to view the entry of the saved party you want to display it onto a JFrame - How to Use Labels (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components) you can use the .setIcon to use a image onto the JLabel.

  4. #4
    Junior Member
    Join Date
    May 2013
    Posts
    5
    My Mood
    Cheerful
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Use Image in a java Class

    Thankx......... i got it.
    Born to learn

Similar Threads

  1. Replies: 2
    Last Post: October 31st, 2012, 01:07 AM
  2. Replies: 3
    Last Post: June 17th, 2012, 06:22 PM
  3. Create image Jpeg from an object of Image class.
    By Ramandeep in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: December 31st, 2011, 11:34 PM
  4. Looking for a Image class with the following functionality.
    By ishtar in forum Java Theory & Questions
    Replies: 2
    Last Post: December 19th, 2011, 05:31 AM
  5. Replies: 2
    Last Post: June 29th, 2009, 03:06 PM