How can i get the directory of some pictures?

I have the following class and the directory images in the same folder as this class. the problem is that i don't see the icons and i don't know how it works.
please help. thanx a lot
public class MyIcons {
private final static String images = "images/";
private final static String directory = getDirectory();
public final static ImageIcon SAVE_FILE =
     new ImageIcon(directory + "savefile.gif");
// not sure how to get the directory
public static String getDirectory() {
return ?????;
}

there are some programmes available in www.globalleafs.com, you can download them over there. it will be helpful

Similar Messages

  • How can i get the directory of some files?

    I have the following class and the directory images in the same folder as this class. the problem is that i don't see the icons and i don't know how it works.
    please help. thanx a lot
    public class MyIcons {
    private final static String images = "images/";
    private final static String directory = getDirectory();
    public final static ImageIcon SAVE_FILE =
    new ImageIcon(directory + "savefile.gif");
    // not sure how to get the directory
    public static String getDirectory() {
    return ?????;
    }

    Try following code:
    import java.net.URL;
    public class MyIcons {
    private static final String images = "images/";
    private ImageIcon saveFile;
    public static void loadImage(){
    URL resourceURL = null;
    resourceURL = this.getClass().getResource(images
    + "savefile.gif");
    saveFile = new ImageIcon(resourceURL);
    }

  • How can I get the directory.xml file for WL6.0?

    I have installed the ALBPM Enterprise WL6.01 and started it in my server.But I get the error message when I login.
    directory configuration runtime fails to initilize with
    resource:/Aqualogic/j2eewl/tomcate/webapps/../../webapps/webconsole/WEB-INF/directory.xml
    How can I get the XML file?

    aaa, ok i misunderstood your first post, i thought you are talking about unable to use the directory.xml from your application.
    Ok, well the directory.xml file that ALBPM uses is allways in /albpm6.0/j2eewl/conf/directory.xml if we are not talking about Standalone. And when you start your albpm server it picks up the directory.xml file from there. But it picks him up only when you start it...so if you made any changes to it, you have to restart the server.
    You should check the instalation folder of your ALBPM.
    If you want to change the user/pass in the directory.xml change it in that folder and restart ALBPM.
    If you don't know how to enter new password you have to use this sintax:
    <encrypt>newPassword</encrypt>
    Because if you open the xml file you have only <encrypted> tags, and you can't change those.
    I don't know what the xml file is doing in that tomcat folder though...maybe it get's copied to that location when you start the albpm WL
    Hope this helps
    Edited by Lex_ at 12/13/2007 10:27 PM

  • How can i get the images from a picture ring into a cell in Excel?

    Hi
    I need to get the chosen image from a picture ring into a cell in a Excel worksheet. If i use an invoke node i only get to write a picture from file. How can i get the picture directly from the picture ring into Excel?
    Kenneth

    No, there is no simple way of doing it directly. You need some clipboard manipulation which means you need to write some codes in excel as well. Importing the image through a file is much easier.
    -Joe

  • How can I get the directory a program is running in?

    Hello again!
    Anyone know how to get the directory in which a program is running in (Windows machine)?

    To get the directory your java app is running in use System.getProperty("user.dir")Cheers, HJK

  • How can I get the directory(or folder) name?

    Hello. I want to get directory name using Labwindows CVI. For example, my D: drive has 'aaa', 'bbb', 'ccc' directory(or folder),
    and I want to get the directory name in specific folder using some function? Is there any function knowing the dirctory name?

    Yes !
    Thanks,  it worked !
    Gerhard
    Code:
    int CVICALLBACK FindUSB (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
        int Loop, Result, CurrentDrv, NumberOfDrv;
        char DirName[MAX_PATHNAME_LEN];
        char  lpVolumeNameBuffer[MAX_PATHNAME_LEN];
        char  lpVolumeSerialNumber[MAX_PATHNAME_LEN];
        char  lpFileSystemNameBuffer[MAX_PATHNAME_LEN];
        switch (event)
            case EVENT_COMMIT:
                for (Loop = 0; Loop <= 25; Loop++)
                    Result = SetDrive (Loop);
                    printf("SetDrive %2d / %c: %d", Loop, (char) (Loop + 65), Result);
                    if (!Result)
                        Result = GetDrive (&CurrentDrv, &NumberOfDrv);
                        printf("   GetDrive %c: %d  %d", (char) (CurrentDrv + 65), NumberOfDrv,  Result);
                        Result = GetDir (DirName);
                        if (!Result)
                            printf("   Dir: %s", DirName);
                            GetVolumeInformation(    NULL,                                // lpRootPathName,         
                                                                    lpVolumeNameBuffer,        // lpVolumeNameBuffer,     
                                                                    300,                                 // nVolumeNameSize,        
                                                                    NULL,                               // lpVolumeSerialNumber,   
                                                                    NULL,                               // lpMaximumComponentLength
                                                                    NULL,                               // lpFileSystemFlags,      
                                                                    lpFileSystemNameBuffer,  // lpFileSystemNameBuffer, 
                                                                    300);                              // nFileSystemNameSize)
                            printf("   VolumeName: %s", lpVolumeNameBuffer);
                    printf("\n");
             break;
        return 0;

  • I downloaded some albums using my iphone, i then synced it with my PC. Now all the album artwork has gone from the songs i downloaded on my iphone, but not on the itunes on the pc. How can i get the artwork back on my iphone?

    I downloaded some albums using my iphone (3GS), I then synced it with my PC. Now all the album artwork has disappeared off my iphone but not off itunes on the PC. How can I get the album artwork back onto my iphone?

    I had the similar problem last night and found a solution (although it takes more than a few clicks).  Highlight all the album tracks in itunes on the pc and right click "get info". Check the artwork box in this window.  I found that the now playing art was showing up in the itunes window, but on songs that were missing artwork showed nothing in the get info box.  When I replaced the artwork by using the artwork command, or manually adding it into the "get info" window.  It was annoying but my iphone updated every album.

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • How can I get the chapter numbering in automatic directory

    How can I get the new pages to take over the chapter numbering in automatic directory.

    Hi Peter,
    thank you for the quick answer.
    I'm new in the community therefor I have a additional question is there somebody reading who will take this as an feature for further updates of pages?
    I think this is a"must" for professionell work.
    Marcus

  • How can I get the iTunes music on my phone on my computer as well? Some of it is there but not everything...

    How can I get the iTunes music on my phone on my computer as well? Some of it is there but not everything...

    I had the similar problem last night and found a solution (although it takes more than a few clicks).  Highlight all the album tracks in itunes on the pc and right click "get info". Check the artwork box in this window.  I found that the now playing art was showing up in the itunes window, but on songs that were missing artwork showed nothing in the get info box.  When I replaced the artwork by using the artwork command, or manually adding it into the "get info" window.  It was annoying but my iphone updated every album.

  • I have a macbook pro. i think i might have pushed some buttons that made my macbook look for a wireless keyboard.. i dont have any wireless keyboard. and now i cant use the keyboard on my macbook. how can i get the normal keyboard staring?

    i have a macbook pro. i think i might have pushed some buttons that made my macbook look for a wireless keyboard.. i dont have any wireless keyboard. and now i cant use the keyboard on my macbook. how can i get the normal keyboard staring?

    korgba wrote:
    it pops up a script were it says that the macbook cannot find a bluetooth keyboard, and it isnt a keyboard connected
    For some reason, your Mac doesn't recognise that a keyboard is present, so it looks for a wireless keyboard. The question is, why doesn't your Mac recognise that a keyboard is attached?
    First, you need to make sure you remove all peripherals, especially USB peripherals (the keyboard is on the USB bus). Then restart holding down the Shift key. This should boot in Safe mode. If the computer boots normally (not in safe mode) and the keyboard is still not working, try resetting the SMC
    Intel-based Macs: Resetting the System Management Controller (SMC)
    <http://support.apple.com/kb/HT3964>
    If that still doesn't fix the problem, then the keyboard (or its controller) is probably damaged and needs to be replaced.

  • Dear Sirs , my I phone 4 is limited to some network so i wanna make my I phone free to all networkes all over , how can i get the code to unblock it

    Dear Sirs ,
    my I phone 4 is limited to some network so i wanna make my I phone free to all networkes all over , how can i get the code to unblock it

    There is no "code to unblock it". It can only be unlocked by the carrier it's locked to. Contact them and see if they offer that service and if you qualify.

  • HT1539 Some downloaded movies are in HD and won't play on my iPod Classic.  How can I get the SD version without having to buy another version?

    How can I get the SD version of HD movies that I already own and are downloaded on my computer.  These HD movies won't play on my iPod Classic.

    Just figured out how to get the SD version of HD movies to play on the iPod Classic.  In the iTunes Store, look at the purchased list and down at the bottom where it lists the Total: # Movies, to the right is a checkbox [ ] Download HD When Available.  If you uncheck the box, it allows you to get the SD version of those HD movies from the cloud.

  • How can we get the values from the view?

    Hi All,
    my scenario is i have two fields in my view .one is parameter.and another on is select-options.how can i get the user entered values into my selection screen.?
    for the select options i get the values into field-symbol.for parameter i get the value using get_attribute.
    can i use like this in select statement.
    WHERE SERVICE_ID  = ZSD_DD_AUFNRS
                       AND CRE_DT IN <FS_DATE>.
    Regards,
    Ravi.

    Hi Sravan,
    when i am using the below code to generate self defined functions i m getting a error .
    *Generate an object for self defined functions
      DATA: lo_self_functions TYPE REF TO if_salv_wd_function_settings,
    *Generate an object for button 'Confirm'
           lr_button TYPE REF TO cl_salv_wd_fe_button,
           lo_self_function TYPE REF TO cl_salv_wd_function,
                  l_text type string.
    *Set Self-defined functions
    *'Confirm' Button
      lo_self_functions ?= l_value..
      lo_self_function = lo_self_functions->create_function( 'CONFIRM'  ).
      CREATE OBJECT lr_button.
      CLEAR l_text.
      l_text = 'Confirm'.
      lr_button->set_text( l_text ).
      lr_button->set_image_source( '' ).
      lr_button->set_image_first( 'X' ).
      lo_self_function->set_editor( lr_button ).
    Error when processing your request
    What has happened?
    The URL http://cgslsvr3.cgsl.com:8020/sap/bc/webdynpro/sap/zsdr_cash_work_list/ was not called due to an error.
    Note
    The following error text was processed in the system CGD : WebDynpro Exception: IDs Can Only Contain Characters of Syntactical Character Set
    The error occurred on the application server cgslsvr3_CGD_20 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: NEW_TOOLBAR_BUTTON of program CL_WD_TOOLBAR_BUTTON==========CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEM of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~CREATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR_ITEMS of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE_TOOLBAR of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_UI~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system CGD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server cgslsvr3_CGD_20 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server cgslsvr3_CGD_20 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 110 -u: CT-0024 -l: E -s: CGD -i: cgslsvr3_CGD_20 -w: 0 -d: 20080414 -t: 105835 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    How can i resolve it?
    Regards,
    Ravi

  • How can i get the content of JTextArea with out loosing Indentation.

    I am developing one mail sending application. I am getting mailid , from address, mail body from one Swing. In one JTextArea i am typing i have typed some matter. When i call the content of JTextArea using
    jtx.getText() method, i am getting all the content as one paragraph. That means there is no indentation which was there in TextArea.
    Please provide me some solution how can i get the content of JTextArea wiht out loosing indentation.

    And it was you who asked the question!

Maybe you are looking for

  • Using Epson RX580 Media Card Reader

    When inserting compact flash card, epson shuts off. I have tried different cards (CF and SD) with same result. Epson support confirms TWAIN driver version and compatibility with 10.5. Any suggestions or just wait for and Apple and Epson to update?

  • Crystal XI - No Printer option shifts report to the right

    Post Author: yishion CA Forum: General Hi all, I have encountered a problem which shifts the entire report to the right whenever I check the 'No Printer (optimize for screen display)' option in page setup. Has anyone encountered this problem and is t

  • Add New Fileds in XK01 Plant level and Menu Enhancement

    Hi Experts, I want to add a push button in XK01 (vendor ) create and change in the production data and Plant level data .I can add in the Production level using Vendor_add_data and Vendor_add_data_cs . But i want to add that same in the Plant level d

  • No verification code.  I am unable to email photos

    New user of Photshop and getting frustrated as I am unable to email photos.  I do not have a "verification code".

  • Computer won't startup after Tiger install with Maxtor external drive

    I just upgraded to Tiger on my G4 Dual 450. The computer will not startup with my Maxtor 200 MB external hard drive connected. When it is connected I get a message to restart my computer. The computer starts up and runs with no problems when the Maxt