Re: How to retrieve image from mongodb to show it on panel ?

89 views
Skip to first unread message

jazu

unread,
Jul 29, 2012, 10:16:56 PM7/29/12
to mongod...@googlegroups.com
I mean how to show stored image on panel ? Through java?

Scott Hernandez

unread,
Jul 31, 2012, 12:08:31 AM7/31/12
to mongod...@googlegroups.com
You can store data with mongo using gridfs
(http://www.mongodb.org/display/DOCS/GridFS), or directly in a binary
field in your document. Either way you just need to convert that to an
input stream or use the existing one and you can display that in your
jpanel.

Searching google produce some examples of how to display an image with
a jpanel: http://stackoverflow.com/questions/299495/java-swing-how-to-add-an-image-to-a-jpanel

On Sun, Jul 29, 2012 at 10:16 PM, jazu <ijazala...@gmail.com> wrote:
> I mean how to show stored image on panel ? Through java?
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
Reply all
Reply to author
Forward
0 new messages