Results 1 to 3 of 3
  1. #1
    anes_pa is offline Member
    Join Date
    Feb 2015
    Rep Power

    Unhappy How to filer List<String> to show only relevant value in dialog?

    Hi dears,
    I am a newbie in java prgmming using netbeans IDE . I have a code
    Java Code:
               List<String> files = service.getSecureCloudStoragePort().listFiles();
               SelectFileDialog dialog = new SelectFileDialog(this.getFrame(),true,files);
    my files value get as :
    [1_car.txt@2, 5_Van.txt@6]
    The 2 and 6 refers user id ... I need to show only particular user with his own id.
    So need to filter the files value with that id (after @ in raw data) .. How it can do ? any body suggest
    a method to filter the data . That data format could not be changed in any way...

    Waiting for a fast reply...
    Attached Thumbnails Attached Thumbnails How to filer List&lt;String&gt; to show only relevant value in dialog?-preview.png  

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: How to filer List<String> to show only relevant value in dialog?

    Are you asking about code in the SelectFileDialog class's constructor? You need to post the code if you want help with it.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Rep Power

    Default Re: How to filer List<String> to show only relevant value in dialog?

    I'm thinking the OP wants to research iterating through the list with an Iterator to be able to remove specific elements from it.
    Last edited by gimbal2; 02-17-2015 at 03:23 PM. Reason: Engrish
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 3
    Last Post: 07-28-2011, 07:52 AM
  2. dir list dialog box
    By gadek.a in forum SWT / JFace
    Replies: 0
    Last Post: 01-21-2011, 09:53 AM
  3. Getting show dialog box to generate properly
    By noobster in forum New To Java
    Replies: 1
    Last Post: 09-28-2010, 10:26 PM
  4. show Message Dialog
    By akritc in forum AWT / Swing
    Replies: 7
    Last Post: 06-10-2010, 02:49 PM
  5. show Confirm Perspective Switch dialog box
    By mostafa in forum Eclipse
    Replies: 0
    Last Post: 11-22-2008, 11:47 AM

Posting Permissions

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