Results 1 to 8 of 8
  1. #1
    theChameleon is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default how to create picture gallery?

    as above. i'd like to browse pictures like in Windows Explorer when it's set to "Extra Large Icons", and when i double click it, i want to open the browser to the webpage that the thumbnail is supposed to point me to.

    however, i do not want the gallery to display all the pics in the folder, just the pics with the boolean "isHidden" set to false.

    how do i do that?
    Last edited by theChameleon; 06-15-2013 at 11:39 AM.

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default Re: how to create picture gallery?

    however, i do not want the gallery to display all the pics in the folder, just the pics with the boolean "isHidden" set to false.
    Use File.listFiles(FileFilter) to get a list of all the files in a specific directory. You can use the filter to check the isHidden() method.

  3. #3
    theChameleon is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default Re: how to create picture gallery?

    Quote Originally Posted by camickr View Post
    Use File.listFiles(FileFilter) to get a list of all the files in a specific directory. You can use the filter to check the isHidden() method.
    my question was about how to display pictures like in Windows Explorer when it's set to "Extra Large Icons".

    the file IO part and all are no issue at all, only the display part is the problem.

    let me rephrase... how to display a gallery of chosen pics just like how Windows Explorer displays pictures when it's set to "Extra Large Icons"?

  4. #4
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default Re: how to create picture gallery?

    You said:

    however, i do not want the gallery to display all the pics in the folder, just the pics with the boolean "isHidden" set to false.

    how do i do that?
    Nowhere in your original question did you state that you already knew how to filter the files in a directory. So I answered that question on how to filter the pics in the folder for you. If you already know how do to that, then why mention that in the posting?


    You are welcome for the help.
    Last edited by camickr; 06-16-2013 at 04:54 AM.

  5. #5
    theChameleon is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default Re: how to create picture gallery?

    Quote Originally Posted by camickr View Post
    You said:



    Nowhere in your original question did you state that you already knew how to filter the files in a directory. So I answered that question on how to filter the pics in the folder for you. If you already know how do to that, then why mention that in the posting?


    You are welcome for the help.
    this is the AWT/Swing subforum, is it not obvious wat the question is about? i mentioned it because i did not want somebody to suggest anything that does not allow me to write in a filter.

    if u r looking for a fight, go elsewhere.

    welcome? dream on. LOL.

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

    Default Re: how to create picture gallery?

    Quote Originally Posted by theChameleon View Post
    this is the AWT/Swing subforum, is it not obvious wat the question is about? i mentioned it because i did not want somebody to suggest anything that does not allow me to write in a filter.

    if u r looking for a fight, go elsewhere.

    welcome? dream on. LOL.
    It wasn't obvious to me, and it evidently wasn't obvious to camickr. Any more rude responses from you and you will be banned for a period. There will be no further warning.

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

  7. #7
    theChameleon is offline Member
    Join Date
    Oct 2010
    Posts
    26
    Rep Power
    0

    Default Re: how to create picture gallery?

    Quote Originally Posted by DarrylBurke View Post
    It wasn't obvious to me, and it evidently wasn't obvious to camickr. Any more rude responses from you and you will be banned for a period. There will be no further warning.

    db
    i did not mean to come across as rude, or mean to be rude. but if u believe that im, then so be it.

    i wish to highlight again that this is the AWT/Swing subforum, and the title is "how to create a picture gallery", not "how to do File IO" etc. all camickr and yourself are doing, is derailing the thread from my AWT/Swing question.

    judging from the rate that i have been helped by this forum, whether u ban me or not, matters not. i will figure out a solution all by myself, as i always do.

    if u believe that this comment is "rude", then so be it.

  8. #8
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    719
    Rep Power
    2

    Default Re: how to create picture gallery?

    "How to create a picture gallery" is a broad question. It's like asking a mechanic, how do I build a car: you can do that thousands of ways. Although most of us have a general idea what it should look like, it still can be different for all of us.

    The accent in your original question was about displaying files that are hidden or not. That question was answered. If you got the wrong answer, or people interpreted incorrectly, you could elaborate a bit.

    So, a File has a method isHidden(). When you run over the list of files that you get for that directory, you check the isHidden() value:
    Java Code:
    for (File pic: myListOfFilesThatCanIncludeHiddenFiles) {
       if ( ! pic.isHidden() ) {
          //include the pic
       }
    }
    To get the list of files directly without the hidden files, use the filefilter as described by camickr. If this does not answer your question, please explain/elaborate/rephrase, or find the solution by yourself, like you always do...

Similar Threads

  1. Gallery 3.0.6
    By java software in forum Java Software
    Replies: 0
    Last Post: 03-22-2013, 11:42 PM
  2. Gallery 3.0.5
    By java software in forum Java Software
    Replies: 0
    Last Post: 02-27-2013, 08:38 AM
  3. Gallery 3.0.3
    By java software in forum Java Software
    Replies: 0
    Last Post: 04-23-2012, 06:46 PM
  4. Picture not showing when create JAR file
    By kmckinley820 in forum New To Java
    Replies: 4
    Last Post: 03-19-2011, 10:11 PM
  5. How to create a network picture Using Java
    By nidhirastogi in forum AWT / Swing
    Replies: 0
    Last Post: 02-16-2011, 04:54 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
  •