Hi Guys
Can someone please tell me what the best way of placing images in the GUI is ?
Thank You.
Printable View
Hi Guys
Can someone please tell me what the best way of placing images in the GUI is ?
Thank You.
Hello Ciwan,
Take a look at this tutorial:
How to Use Icons (The Java™ Tutorials > Creating a GUI with JFC/Swing > Using Swing Components)
This may also be of use to you:
http://www.javaprogrammingforums.com...d-banners.html
:D
lol you've got to be kidding me !!
All that code just to display an image onto the GUI !!!
Thats Java Swing for you.. It takes a lot of code to do simple things.
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:
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.Quote:
cb2.setBanner("http://www.engineeringserver.com/Software/banner.gif");
getContentPane().add(cb2);
cb2.setBounds(7, 280, 469, 63);