aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Is it okay to use images found on the web? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Is it okay to use images found on the web?" Watch "Is it okay to use images found on the web?" New topic
Author

Is it okay to use images found on the web?

Clivant Yeo
Ranch Hand

Joined: May 22, 2004
Posts: 124
Hi all,

I have decided to include some images for my buttons for my user interface to liven the application. I was wondering if it is okay to use images found on the web, instead of creating my own?

rgds,
Clivant


Clivant Yeo
My Personal Website
mike acre
Ranch Hand

Joined: Sep 23, 2003
Posts: 197
It would probably be fine, but why not use Sun's own graphics?

They are known to be acceptable and in a cross platform manner provide a standardised look that goes hand in hand with the metal L&F.

http://java.sun.com/developer/techDocs/hi/repository/


SCJP 1.4, SCJD
Klaas van Gelder
Ranch Hand

Joined: Jul 08, 2004
Posts: 100
I do so now, only a pity that they do not have some nice icons for the connectLocal and connectRemote actions. I use the "Host" (computer) and "Web component" (earth globe) icons for these actions... but i am not completely confident with it. For the disconnect action, I ise the stop icon.
Grtz, Klaas


"What you don't know, can't help you"
SCJP (81%), SCWCD (81%), SCJD (354/400), SCBCD (85%)
mike acre
Ranch Hand

Joined: Sep 23, 2003
Posts: 197
Originally posted by Klaas van Gelder:
only a pity that they do not have some nice icons for the connectLocal and connectRemote actions.


Eh? Aren't you supposed to specify that on the command line?
Klaas van Gelder
Ranch Hand

Joined: Jul 08, 2004
Posts: 100

Eh? Aren't you supposed to specify that on the command line?

Nope.
Here are some quotes from my specs:

These command lines may only take configuration parameters selected from this list:
DNS name of the server
Port number used by the server
Data file name(s)
java.rmi.server.codebase
security manager policy file
---

The user interface for this assignment must satisfy the following criteria:
....
The user interface should connect to the database using either a local or a network based connection according to user choice.
...

In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely


So though it states that the remote host and port MAY be passed at the command line, the latter quotes IMHO clearly state that the user should have the possibiliy to choose bwtween a local and remote connection.
For the remote connection, I use a JOptionPane dialog where the user can enter host[port]. Localhost and the default port 1099 are the default.

Regards, Klaas
[ September 08, 2004: Message edited by: Klaas van Gelder ]
mike acre
Ranch Hand

Joined: Sep 23, 2003
Posts: 197
I thought everyones assignments were the same in that regard.
Do you have a very new one (or a very old one)?
Klaas van Gelder
Ranch Hand

Joined: Jul 08, 2004
Posts: 100
Mine is pretty old indeed, I registered for SCJD about 2 years ago...
Clivant Yeo
Ranch Hand

Joined: May 22, 2004
Posts: 124
Thanks for all of your valuable comments, I found three images that fit the description of the action that my buttons will trigger from the repository.
Yanxin Zhao
Ranch Hand

Joined: May 05, 2004
Posts: 65
Hi:
I want to use the pics made by myself too. but I am not sure where should I put the pics? my thinking is that create a directory named pics and put all pics into this directory. I am not sure is that okay?
[ September 14, 2004: Message edited by: Yanxin Zhao ]
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Yanxin Zhao:
Hi:
I want to use the pics made by myself too. but I am not sure where should I put the pics? my thinking is that create a directory named pics and put all pics into this directory. I am not sure is that okay?

[ September 14, 2004: Message edited by: Yanxin Zhao ]


I built my own icons and put my icon .gif files in the gui directory of the jar file, along with the gui classes. this makes it easy to find these using code like
Yanxin Zhao
Ranch Hand

Joined: May 05, 2004
Posts: 65
Hi: thanks for your reply.
That 's a good idea. But I do not know how to got pics form jar file, I only can got pics from directory which I was created. I just want to ask that how to got pics form jar file ?
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Yanxin Zhao:
Hi: thanks for your reply.
That 's a good idea. But I do not know how to got pics form jar file, I only can got pics from directory which I was created. I just want to ask that how to got pics form jar file ?


If you put the pics in the same directory inside the jar as your class, the code I provided in my previous reply will pull them from the jar. It just gets them from the Classpath.
Yanxin Zhao
Ranch Hand

Joined: May 05, 2004
Posts: 65
Hi: Peter,
Thanks for your reply. I am not use ImageIcon class, I use Image class, I added a pic in my program. those code you given is not adapt to Image class, so do you konw how to got Image from jar file?
Clivant Yeo
Ranch Hand

Joined: May 22, 2004
Posts: 124
Hi Yanxin,

Maybe you can use the ImageIcon class to get the Image object?

For eg.

If you have a image in the images folder called abc.gif, use the code below:

ImageIcon ii = new ImageIcon(ClassLoader.getSystemResource("images/abc.gif"));
// Get the image object
Image image = ii.getImage();

Hopes it help.

Regards,
Clivant
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Clivant Yeo:
Hi Yanxin,

Maybe you can use the ImageIcon class to get the Image object?

For eg.

If you have a image in the images folder called abc.gif, use the code below:

ImageIcon ii = new ImageIcon(ClassLoader.getSystemResource("images/abc.gif"));
// Get the image object
Image image = ii.getImage();

Hopes it help.

Regards,
Clivant


Clivant, that is exactly what I do when I need an image, eg. for setting the icon image on a JFrame, here's the code I use:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it okay to use images found on the web?
 
Similar Threads
Wrapper class constructors
Query: Consultant asking for money.
SCEA part 2 question
Best place for .properties file?
Where to store image files in Java web app