Quantcast

Add images to gui - Gui Builder

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Add images to gui - Gui Builder

Samarions
Hi,

I'm going crazy here, trying to add an image to a gui I'm making, using the Netbeans 6.1 gui builder.

I've downloaded the swingx-jar in hope of trying to use stuff there but nothing works. JXImagePanel, JXImageView... I can't figure out what to use and how to use it.

The image lies under the same directory as the source code.

This is my first time using a gui editor.

Help!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add images to gui - Gui Builder

Johnny Kewl

----- Original Message -----
From: "Samarions" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, September 27, 2008 10:07 PM
Subject: [nbusers] Add images to gui - Gui Builder


>
> Hi,
>
> I'm going crazy here, trying to add an image to a gui I'm making, using
> the
> Netbeans gui builder.
>
> I've downloaded the swingx-jar in hope of trying to use stuff there but
> nothing works. JXImagePanel, JXImageView... I can't figure out what to use
> and how to use it.
>
> This is my first time using a gui editor.
>
> Help!


Open a normal Java Project, add a JFrame (so you can tes this)
Add the image to your project... will be in the classpath
Compile it...
Add a JLabel to the frame, or panel or whatever...
Look at the JLabel props... click on the ... button
Select the image from the classpath you put it in...

Done!

Try an animated gif... thats fun

If you look at the code it generates, that is the basis for image loading.
Then Java 2D stuff lets you do stuff like rotate, resize... yada yada... if
you need that.

Have fun...

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add images to gui - Gui Builder

Johnny Kewl
In reply to this post by Samarions

----- Original Message -----
From: "Johnny Kewl" <[hidden email]>
To: <[hidden email]>
Sent: Sunday, September 28, 2008 12:20 PM
Subject: Re: [nbusers] Add images to gui - Gui Builder


>
> ----- Original Message -----
> From: "Samarions" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, September 27, 2008 10:07 PM
> Subject: [nbusers] Add images to gui - Gui Builder
>
>
>>
>> Hi,
>>
>> I'm going crazy here, trying to add an image to a gui I'm making, using
>> the
>> Netbeans gui builder.
>>
>> I've downloaded the swingx-jar in hope of trying to use stuff there but
>> nothing works. JXImagePanel, JXImageView... I can't figure out what to
>> use
>> and how to use it.
>>
>> This is my first time using a gui editor.
>>
>> Help!
>
>
> Open a normal Java Project, add a JFrame (so you can tes this)
> Add the image to your project... will be in the classpath
> Compile it...
> Add a JLabel to the frame, or panel or whatever...
> Look at the JLabel props... click on the ... button

ICON property

> Select the image from the classpath you put it in...
>
> Done!
>
> Try an animated gif... thats fun
>
> If you look at the code it generates, that is the basis for image loading.
> Then Java 2D stuff lets you do stuff like rotate, resize... yada yada...
> if you need that.
>
> Have fun...
>
> ---------------------------------------------------------------------------
> HARBOR : http://www.kewlstuff.co.za/index.htm
> The most powerful application server on earth.
> The only real POJO Application Server.
> See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
> ---------------------------------------------------------------------------
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add images to gui - Gui Builder

Samarions
In reply to this post by Johnny Kewl
Yeeeey!

That was too easy. Now my Frame will be finished in aminute.

Thanks, you saved the day.

Johnny Kewl wrote
----- Original Message -----
From: "Samarions" <cl4mwern@cling.gu.se>
To: <nbusers@netbeans.org>
Sent: Saturday, September 27, 2008 10:07 PM
Subject: [nbusers] Add images to gui - Gui Builder


>
> Hi,
>
> I'm going crazy here, trying to add an image to a gui I'm making, using
> the
> Netbeans gui builder.
>
> I've downloaded the swingx-jar in hope of trying to use stuff there but
> nothing works. JXImagePanel, JXImageView... I can't figure out what to use
> and how to use it.
>
> This is my first time using a gui editor.
>
> Help!


Open a normal Java Project, add a JFrame (so you can tes this)
Add the image to your project... will be in the classpath
Compile it...
Add a JLabel to the frame, or panel or whatever...
Look at the JLabel props... click on the ... button
Select the image from the classpath you put it in...

Done!

Try an animated gif... thats fun

If you look at the code it generates, that is the basis for image loading.
Then Java 2D stuff lets you do stuff like rotate, resize... yada yada... if
you need that.

Have fun...

---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
Loading...