Page 1 of 2 12 LastLast
Results 1 to 20 of 26
Like Tree1Likes

Thread: help how to retrieve image in jtable without writing a picture into hard disk?

  1. #1
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default help how to retrieve image in jtable without writing a picture into hard disk?

    help how to retrieve image in jtable without writing a picture into hard disk?

    im using netbeans and ms access as database

    what i want is to show all the imaage in the jtable.

    please help me

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    Depends what you mean by 'retrieve' in
    how to retrieve image in jtable
    And files are written to disk, not pictures.

    And is it really beyond your capability to capitalize the first letter of each sentence and appropriate letters of JDK class names, and spell "I'm" correctly? This is a technical forum, not SMS chat.

    Recommended reading: How to ask questions the smart way

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    Please help me sir im sorry for my question if it is not proper

    i know how to retrieve picture by writing the picture from a database to a path sir then browse it and put it to the JButton

    sorry for my bad english.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    Read the image from the database into a byte[].
    Create an ImageIcon from that byte[].
    Create a JButton using that ImageIcon.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    SIR tolls can you help me how to do that?

    im really newbie

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    Tolls suggested three steps. Which one do you require help with?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  7. #7
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    We can't do it in jTable sir? because i only have four jButton. what if in database i have five pictures so i can't retrieve the fifth one. but in jTable i can retrieve them all. But i don't know how to do that.

    Sir can you help me in Read the image from the database into a byte[].?

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    Quote Originally Posted by knowmeifyou View Post
    Sir can you help me in Read the image from the database into a byte[].?
    Do you know how to access a database table from Java?
    Do you know how to query a database table and obtain a ResultSet?
    Have you gone through the API of ResultSet?

    db
    Last edited by DarrylBurke; 04-06-2012 at 04:48 AM.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  9. #9
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    i only know this two things sir

    access a database table in java using query.
    a resulset is the output of the query right?

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    So read the API of ResultSet to find what methods you need to use.

    Trail: JDBC(TM) Database Access (The Java™ Tutorials)

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  11. #11
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    i know how to do that sir. but i cant retrieve image to jtable

    i only know how to retrieve text to jtable

    not image

  12. #12
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    How is the image stored in the database table? In what format?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  13. #13
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    Quote Originally Posted by knowmeifyou View Post
    i cant retrieve image to jtable

    i only know how to retrieve text to jtable
    If you don't break this up into its several parts you're going to keep on repeating that. Not only that, but you haven't been adequately clear on what you do and don't know, leading to unnecessary posts and lengthening both the thread and the time it will take to arrive at a solution.

    You don't "retrieve image to jtable"

    You read a field from a database table into an appropriate data structure or class (which involves a few steps)
    You construct an Icon from the image data (which involves a few steps)
    You display that Icon in a JTable (which involves a few steps)

    We're still on the last step of the first above, since it's only just become clear that you do know how to access a database table and get a RecordSet from it. Hopefully.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  14. #14
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    so what do i need to do first sir? know how to retrieve the data from my database database to java first?

  15. #15
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    See #10.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  16. #16
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    where is #10 sir? sorry i really want to learn but i dont know how to start.

  17. #17
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    Quote Originally Posted by knowmeifyou View Post
    where is #10 sir?
    Here.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  18. #18
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    ah you mean post number 10 sir heheh. ill try it thank you

  19. #19
    knowmeifyou is offline Member
    Join Date
    Apr 2012
    Posts
    13
    Rep Power
    0

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    sir can u give me some hints how to retrieve a picture then put it to jtable? i really can do it :-(

    i already read the post number ten but i don't know how to apply it to the program

  20. #20
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: help how to retrieve image in jtable without writing a picture into hard disk?

    You've yet to show code showing what you've tried or how it's not working for you. How will we know where you're stuck and what you need help with? Short of writing a complete huge program, how can we help you here?
    DarrylBurke likes this.

Page 1 of 2 12 LastLast

Similar Threads

  1. Serial number of exernal hard disk/Thumbdrive
    By manucng in forum Networking
    Replies: 13
    Last Post: 11-14-2011, 08:09 AM
  2. Hard Disk Bottleneck
    By urbanleg in forum New To Java
    Replies: 3
    Last Post: 09-27-2011, 03:02 PM
  3. Replies: 1
    Last Post: 07-28-2011, 08:48 AM
  4. Retrieve Image From Hard Disk
    By sayan751 in forum AWT / Swing
    Replies: 3
    Last Post: 02-20-2009, 03:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •