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

Thread: What are the best way of placing images in GUI?

  1. #1
    Junior Member Ciwan's Avatar
    Join Date
    Feb 2009
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post What are the best way of placing images in GUI?

    Hi Guys

    Can someone please tell me what the best way of placing images in the GUI is ?

    Thank You.
    "Extraordinary Claims Require Extraordinary Evidence" .... American Astrochemist Carl Sagan.


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Images in the GUI

    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  3. #3
    Junior Member Ciwan's Avatar
    Join Date
    Feb 2009
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Images in the GUI

    lol you've got to be kidding me !!

    All that code just to display an image onto the GUI !!!
    "Extraordinary Claims Require Extraordinary Evidence" .... American Astrochemist Carl Sagan.

  4. #4
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: Images in the GUI

    Thats Java Swing for you.. It takes a lot of code to do simple things.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  5. #5
    Banned
    Join Date
    May 2008
    Posts
    25
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Images in the GUI

    Quote Originally Posted by Ciwan View Post
    lol you've got to be kidding me !!

    All that code just to display an image onto the GUI !!!
    Hi all, i havent been here for a while (due to an argument with the admin here) but the code below is all you need to display an image:

    cb2.setBanner("http://www.engineeringserver.com/Software/banner.gif");
    getContentPane().add(cb2);
    cb2.setBounds(7, 280, 469, 63);
    I've also written an updated version with new features such as adding an image to a default position on your GUI so you don't need to write cb.setBounds(); but i haven't linked the updated files here.

  6. #6
    Junior Member JVposter's Avatar
    Join Date
    Feb 2009
    Location
    Romania
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Images in the GUI

    Quote Originally Posted by Ciwan View Post
    Hi Guys

    Can someone please tell me what the best way of placing images in the GUI is ?

    Thank You.
    hello!

    Load in a Jlable and put to the GUI!
    you have a tutorial above

    Regards,

Similar Threads

  1. [SOLVED] Need to display multiple images from database on a webpage
    By raghuprasad in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: May 13th, 2009, 03:15 AM