Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Is it okay to use images found on the web?

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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/
 
Ranch Hand
Posts: 111
PHP Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
mike acre
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 111
PHP Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 111
PHP Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mine is pretty old indeed, I registered for SCJD about 2 years ago...
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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:
 
reply
    Bookmark Topic Watch Topic
  • New Topic