Is there any replacement to this function:getFontMetrics

I noticed that the function
Toolkit.getDefaultToolkit().getFontMetrics(Font)is deprecated but i didnt find anything that replaces this function
Is there a replacment?
thanks
Liat

If you look up the method in the api it will tell you what has replaced it. Here, it's LineMetrics.
So:
    String text = "sample string";
    g2.setFont(font);
    FontRenderContext frc = g2.getFontRenderContext(); // or use constructor
    LineMetrics metrics = font.getLineMetrics(text, frc);

Similar Messages

  • I have photos in a DVD. In order to visualize them in iPhoto, must I necessarily import them? Can't I see the pictures from the media without importing? If not, is there any application with this functionality? I dont't like pre-visualization for photos.

    I have photos in a DVD. In order to visualize them in iPhoto, must I necessarily import them? Can't I see the pictures from the media without importing? If not, is there any application with this functionality? I need an app that allows me to navigate through the photos without selecting all of them. I realy dont't like pre-visualization for photos...

    In order to visualize them in iPhoto, must I necessarily import them?
    iPhoto is a Database. Before it can work with any data it must be imported to the database, so yes it is necessry to import them.
    Can't I see the pictures from the media without importing?
    See above.
    If not, is there any application with this functionality?
    Hundreds. Any image viewer will do the job. On your Mac the Finder has QuickLook and there is the Preview app as well. Online you can download any of these:
    http://www.macupdate.com/find/mac/image%20viewer

  • In PC I have changed the default app location from default to other and copied the previous content to new location and changed the Default location in preference. Now in iTunes, my previous apps are not visible. Is there any solution to this?

    In PC I have changed the default app location from (c:/users/username/My Music/iTunes) to other (d:iTunes)  and copied the previous content to new location and changed the Default location in Edit preference. Now in iTunes, my previous apps are not visible. Is there any solution to this?

    wjosten - thanks very much for the detailed instructions. I'll try this as soon as I get my replacement and it looks like you'll probably end up getting the green tick

  • Any idea what this function is meant for?

    DB version:10gR2
    Have you guys any idea what this function does?
    create or replace function separate_1
        in_list varchar2,
        in_del varchar2 := ','
    ) return split_tbl pipelined
    is
        l_idx    pls_integer;
        l_list    varchar2(32767) := in_list;
        l_value    varchar2(32767);
    begin
        loop
            l_idx := instr(l_list,in_del);
            if l_idx > 0 then
                pipe row(substr(l_list,1,l_idx-1));
                l_list := substr(l_list,l_idx+length(in_del));
            else
                pipe row(l_list);
                exit;
            end if;
        end loop;
        return;
    end separate_1;The comment for this functions says that this is used to split a string delimited by a comma separator. But i didn't understand this function. Can this functionality be achieved without a table function?

    user10450365 wrote:
    DB version:10gR2
    Have you guys any idea what this function does?Odd that. Apart from a couple of parameter name changes it looks almost identical to a function I posted a couple of years back...
    SQL> CREATE OR REPLACE TYPE split_tbl IS TABLE OF VARCHAR2(32767);
      2  /
    Type created.
    SQL> CREATE OR REPLACE FUNCTION split (p_list VARCHAR2, p_delim VARCHAR2:=' ') RETURN SPLIT_TBL PIPELINED IS
      2      l_idx    PLS_INTEGER;
      3      l_list   VARCHAR2(32767) := p_list;
      4      l_value  VARCHAR2(32767);
      5    BEGIN
      6      LOOP
      7        l_idx := INSTR(l_list, p_delim);
      8        IF l_idx > 0 THEN
      9          PIPE ROW(SUBSTR(l_list, 1, l_idx-1));
    10          l_list := SUBSTR(l_list, l_idx+LENGTH(p_delim));
    11        ELSE
    12          PIPE ROW(l_list);
    13          EXIT;
    14        END IF;
    15      END LOOP;
    16      RETURN;
    17    END SPLIT;
    18  /
    Function created.
    SQL> SELECT column_value
      2  FROM TABLE(split('FRED,JIM,BOB,TED,MARK',','));
    COLUMN_VALUE
    FRED
    JIM
    BOB
    TED
    MARK

  • HT201667 I rented a movie through itunes on my ipad and wanted to watch it with friends on a digital projector, but it wouldn't allow me to do it.  Is there any way around this?

    I  rented a movie through itunes on my ipad and wanted to watch it with friends on a digital projector, but it wouldn't allow me to do it.  Is there any way around this?

    The issue was that a dialogue box came up which said that I couldn't play this movie on another device.  I tried playing the same movie on an Tv with an HDMI connection attached to an adapter to the IPad and that worked.  I wonder if the problem is that the digital projector has a VGA connection.

  • My ipod nano 6th gen fell out of my pockey and the screen cracked badly, is there any coverage for this under warranty? I just bought it a month ago. If not what are the options for getting it fixed

    My ipod nano 6th gen fell out of my pocket and the screen cracked badly, is there any coverage for this under warranty? I just bought it a month ago. If not what are the options for getting it fixed? It is pretty frustrating, it fell from about 3 feet out of my pocket and now looks like it was beaten by a hammer.

    Debbie:
    deborahfromwindsor wrote:
    he advises restarting by inserting the OSX disc and pressing down the C button to reboot from there then selecting disk utility, hard disk and repair.... Does he mean me to hold down the C key on the alpha keyboard or the ctrl key?
    Should I just ask for my money back??? If it is a simple repair do I just literally push the disc in, push the power button and hold down the C button?
    That's where I would begin, too, with
    Repair Disk
    Insert Installer disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu (Panther and earlier) or Utilities menu (Tiger) and launch Disk Utility.
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    (Check S.M.A.R.TStatus of HDD at the bottom of right panel, and report if it saysanything but Verified)
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    If DU reports errors it cannot repair you will need touse autility like TechTool Pro,Drive Geniusor DiskWarrior
    First we need to determine if the issue you are experiencing with the computer is software or hardware based. Once we have gotten things sorted out there should be time enough to make you decision about keeping or returning it.
    cornelius

  • HT1212 So my phone is messed up and you can't do anything with the screen...in order for me to sink it to back up i have to enter the passcode because it had a lock on it...and i can't due to it being messed up...is there any way around this...

    So my phone is messed up and you can't do anything with the screen...in order for me to sink it to back up i have to enter the passcode because it had a lock on it...and i can't due to it being messed up...is there any way around this...

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • Hi, I've been playing Smurf's village for a year now and just last week, i tried to get into the app but it keeps rejecting and goes back to the main page.  Is there any reason for this?  I've been updating the app everytime and now it's not letting me in

    Hi, I've been playing Smurf's village for a year now and just last week, i tried to get into the app but it keeps rejecting and goes back to the main page.  Is there any reason for this?  I've been updating the app everytime and now it's not letting me in.  Pls advise. Tq

    Reset the device, restart the device, try downloading any other app.
    All of these are basic steps that could have been found by a simple search of the forums as a resolution for the issue.

  • When I try to buy ibooks from my ipad, the virtual keyboard is not the same as my computer, and so as my password consists of numbers, letters and symbols my ipad keeps showing that my password is incorrect! Is there any way around this problem please?

    When I try to buy ibooks from my ipad, the virtual keyboard is not the same as my computer keyboard, and since my password consists of letters, numbers and symbols, the ipad keeps displaying "incorrect password". Is there any way around this please anybody?

    katykittenoid wrote:
    the virtual keyboard is not the same as my computer keyboard
    Are you using the virtual keyboard to input your password and you cannot see/find the characters you need on that keyboard?
    Or are you trying to use a bluetooth keyboard and pressing the printed key does not produce the right character?

  • I've set up email on my iPad (talk mails when connected to my home router and ISP. When connected to a router at another location with a different ISP I can receive mail but not send it. Is there any way round this

    I've set up email on my iPad (talktalk.net) and can send and receive mails when connected to my home router and ISP. When connected to a router at another location with a different ISP I can receive mail but not send it. Is there any way round this?

    I've set up email on my iPad (talktalk.net) and can send and receive mails when connected to my home router and ISP. When connected to a router at another location with a different ISP I can receive mail but not send it. Is there any way round this?

  • Why are HP printer cartridges country specific? Is there any way around this?

    I have just moved from the UK to Newfoundland, Canada and I have brought my HP PSC 1610 printer with me.  I was advised not to bring any cartridges with me because they would explode during the flight so I had to buy new cartridges upon arrival.
    I noticed that the cartridge numbers recommended for my printer were similar but not exactly the same but the (HP, etc.) websites I looked at did not mention that HP printer cartridges country specific.
    In the UK black cartridge is an HP338 (C8765EE).
    In Canada the websites told me that the black cartridge is a 94 (C8765WC).
    I ordered a 94 cartridge (which took an indordinate amount of time to be delivered) and when I installed it my printer would not accept it ("not intended for use in this printer" error message) even though it fit perfectly.  I looked at the packaging in greater detail and noticed that I had been sent a 94 (C8765WL) and I also noticed (in a very small font size) "for sale only in Latin America".
    My questions are therefore:
    1) Why are HP printer cartridges country specific?
    2) Is there any way around this?  Eg is there anything I can do to my printer/ laptop to tell it to accept this cartridge?
    3) Are 94/ C8765WL cartidges compatible with 94/ C8765WC cartirdges?  Ie did the supplier sell me something that couldn't be used even if I had a Canadian HP PSC 1610 printer?
    4) Can I return the cartridges to the supplier given that it is based in Canada, they delivered it to me in Canada and yet they sold me a product that says "for sale only in Latin America"?
    Thanks
    anenglishmaninsaintjohns

    You will need to Contact HP to request a "Regionalization Reset". There should not be any charge for this, it is covered as part of the cartridge warranty. You will need to have access to your computer and printer while on the line with HP. You will also need to have a set of cartridges for the new region, once the reset is complete cartridges from the original region will no longer work.  HP's web page on the subject is here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • My on/off button does not appear to be working on my iphone 3.....is there any way around this....anyway around this?...the phone also periodically just switches off.

    my on/off button does not appear to be working on my iphone 3.....is there any way around this....anyway around this?...the phone also periodically just switches off.

    Likely a hardware issue... no way around that except to get it repaired or don't use it (the button).
    Try restoring to solve the switching off problem.

  • Primarily using the ipad air as an art portfolio but photos i upload in order get rearranged. other than changing the date they were shot, is there any solution to this? can they be reorganized in iphoto on the ipad?

    primarily using the ipad air as an art portfolio but photos i upload in order get rearranged. other than changing the date they were shot, is there any solution to this? can they be reorganized in iphoto on the ipad?

    You are welcome.
    Sorting and organizing photos on IOS devices is one of the things that really need to be improved. It looks like the developers simply did not expect the users to want to keep large photo libraries on an IOS device, where the ordering would matter. I'd send feedback to the developer team, so that they see, what the users want and need:
    You can use this form:  Apple - iPhoto - Feedback

  • I have highlighted words in an .iba file. Now I need to increase the space before (and/or after) the paragraph it's contained in. If I increase the space after, the height of the highlighting increases also. Is there any way around this?

    I have highlighted words in an .iba file. Now I need to increase the space before (and/or after) the paragraph it's contained in. If I increase the space after, the height of the highlighting increases also. Is there any way around this?

    http://www.apple.com/feedback/kaywerty wrote:
    A rather long winded way of asking if anybody knows if it's possible to have multi-windows open
    It's not possible.
    Suggestions here -> Apple Product feedback

  • I am a student trying to purchase creative card with a maestro card but won't allow anything other than master card or visa, is there any way around this?

    I am a student trying to purchase creative cloud with a maestro card but won't allow anything other than master card or visa, is there any way around this?

    No, not that I know about... but you might check the credit card page to see if there is an option
    Change/Verify Account https://forums.adobe.com/thread/1465499 may help
    -Credit card https://helpx.adobe.com/utilities/credit-card.html

Maybe you are looking for