Results 1 to 2 of 2
  1. #1
    shyamchander is offline Member
    Join Date
    Dec 2008
    Posts
    1
    Rep Power
    0

    Default DirectoryDialog - Recent folder

    I am using DirectoryDialog (swt) to select the folder. The issue is every time it is open the Windows Dialog (Browse for Folders) with default selction as 'My Documents' folder.

    My requirement is to Open the DirectoryDialog with recently selected folder. Unfortunalty setFilterPath() wont help me in this regard. Some how I need to get it from Windows itself.

    Thank in Advance.

    Shyam

  2. #2
    tjs
    tjs is offline Member
    Join Date
    Feb 2009
    Posts
    3
    Rep Power
    0

    Default

    FileDialog fd = new FileDialog(parent.getShell(), SWT.OPEN);
    fd.setText("Open");
    fd.setFilterPath("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}");
    String[] filterExt = {"*.txt"};
    fd.setFilterExtensions(filterExt);
    fd.open();
    MessageDialog.openInformation(null, "Opening Project...","Project Selected");
    parent.getShell().dispose();

    }

Similar Threads

  1. Where to find most recent java platform???
    By busdude in forum New To Java
    Replies: 5
    Last Post: 11-16-2008, 03:19 AM
  2. want to run my code from any folder ?
    By Shyam Singh in forum New To Java
    Replies: 1
    Last Post: 08-12-2008, 01:31 PM
  3. Replies: 0
    Last Post: 07-02-2008, 08:00 PM
  4. Demonstration of the DirectoryDialog class
    By Java Tip in forum SWT Tips
    Replies: 0
    Last Post: 07-02-2008, 07:56 PM
  5. add password to folder
    By ismailsaleh in forum AWT / Swing
    Replies: 1
    Last Post: 01-08-2008, 05:46 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
  •