How do I get an image of the computer inside a java application?

Asked

Viewed 493 times

5

I have a registration and I would like the user to choose an image to represent it. Otherwise, a default image would appear.

That is, in a certain part of the register would have a button that when clicked open the Windows manager for choosing the image, but restrict so that only choose an image and something of the "type" image, without being a document, for example.

How does the attribute represent this image? How to do this in a simple way?

  • 2

    See if it helps http://stackoverflow.com/a/11301085/3792998

  • 2

    I believe you want something like this http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html

  • Thanks @Maiconcarraro and jsantos1991 thanks!

1 answer

3


Browser other questions tagged

You are not signed in. Login or sign up in order to post.