Fonts in java apps for win and linux

Hi everyone.
i need to build an application mult-plataform, to run in windows and linux...
but i don�t know waht font i must use...the default font that java takes doesn�t exist in linux (dialog)...
waht font should i use in my app??
thanx

For going multi-platform it is easiest to stick to the logical fonts: Fonts named "Serif", "SansSerif", "Monospaced", "Dialog", and "DialogInput".
These fonts are guaranteed to exist on any platform, although their implementations may be different. If you use others then you'll have to figure out how to deal with cross platform issues.
Jeff

Similar Messages

  • IndexOf - difference between Win and Linux encoding

    Hello folks, wondering if someone could put me on the right track over this little problem with porting a java app to Linux...
    I have a nice little program, developed on (the latest) JDK under windows which reads a custom file format, locates the second occurance of the substring 'PNG', ignores everything before the character before this PNG (hence the -1 below) and saves the remainder, which is now a bog-standard PNG image. The first 'PNG substring always occurs within the first 50 bytes (hence the 50 below) and the second around the 2kB mark. Here's the line that finds the location of the second 'PNG' in the file loaded into strFileContent:
    location = strFileContent.indexOf( "PNG", 50 )-1;All is well compiled and run on windows, say file 'test1.xyz' produces a value for location of 2076 and saves a nice PNG called 'test1.png'.
    When I haul it over to Linux (Ubuntu 9.04) and lo, location comes out as 1964 for the same file, and of course the file is no-longer a PNG because there are an extra 112 bytes on the front end. Running the windows compile of the code or a fresh Linux compile makes no difference.
    I'm suspecting Win and Linux Java count, perhaps, line endings or some such differently, perhaps have to check an encoding. I'd appreciate any pointers on correcting this to work on both platforms (ultimately I'm trying to appease a Mac user, but don't have a Mac to play with at the moment).
    Cheers,
    K.
    Ken

    phaethon2008 wrote:
    I'm suspecting Win and Linux Java count, perhaps, line endings or some such differently, perhaps have to check an encoding. I'd appreciate any pointers on correcting this to work on both platforms (ultimately I'm trying to appease a Mac user, but don't have a Mac to play with at the moment).The immediate cause of your problem is probably that Windows uses a 8bit encoding as the default (probably some ISO-8859-{noformat}*{noformat} variant or the Windows-bastardization of it), while Ubuntu uses UTF-8, which has a varying number of bytes per character.
    The much more important underlying problem is that you're trying to treat binary data as if it were text. A PNG image is not text. Handling binary data in Strings (or char[]) is a sure way to invite desaster.
    You must convert your code to handle InputStream/OutputStream/byte[] instead of Reader/Writer/String/char[].

  • Using Oracle driver in JDBC for Unix and Linux based servers

    Please, let me know how to mention the Oracle driver within the forName.class(" "); statement in the Jdbc-Servlet for Unix and Linux based servers.
    I'm using Windows-OS for Java programming. Should I have to use the same environment(Unix/Linux with Oracle) for compiling or just compiling, mentioning the driver in the java program would suffice?
    Please, Help me.
    Thank You.
    from,
    Silas eschole.
    email: [email protected]
    [email protected]

    I've used Oracle's thin driver like this:
    Class.forName ( "oracle.jdbc.driver.OracleDriver" );
    Connection DBConnection = DriverManager.getConnection("jdbc:oracle:thin:USER/PASSWD@database" );
    You need Oracles client classes ( e.g. classes111.zip ) at run time, not during compilation.
    Thin client connects directly to the Oracle DB, so the database description is like PORT:MACHINE:SID
    Connection is made through Oracle's listener even when your DB is in the same machine that your program is running. Port number is propably 1521 or 1526, depending on your listener.ora definitions and used Oracle SQL*Net version.

  • Can I create a java app for my palm zire 71 that uses floating point calc

    I am an eclipse user that is looking at studio creator 2 and was wondering if I could create a java app for my palm zire 71. I have read alot about no floating point support in midp... is that true for java on the palm? If so, how does one calculate with floats and doubles to do sqrt functions etc?
    Thanks in advance for your time
    Dean-O

    I looked at netbeans and it does not support floating points in midlets. Not good for palm app if no floating point ability. J2ME supports floating point but in netbeans... is uses midlets and there are no floating points. Now what does one do? Not that dreaded C++
    THanks in advance
    Dean-O

  • I have an iphone 3g I tried to dl an app for netflix and it said i need to have ISO 5 but my phone has ISO 4.2.1 and when i try to update it I get message saying I have current version how or what can i do do to get an app the lets me watch netflix on my

    I have an iphone 3g I tried to down load  an app for netflix and it said I  need to have ISO 5 but my phone has ISO 4.2.1 and when I  try to update it on my computer through itunes  I get message saying I have current version how or what can I do do to get an app the lets me watch netflix on my  iphone 3g .Is there an sulision to my problem? I also tried another app with another name diff from netflix and I got the same message saying i need ISO 5 .Someone please help  thank you

    Thank you for your help are you aware of any apps that will work the iso 4.2.1 system that will let you watch movies on the phone. Also I tried to down load something else the other day and got message that Safari wont let you open this is ther any to see if i have the latest safari on my phone?

  • Already paid need mobile app for ps and ai

    already paid need mobile app for ps and ai on ipad

    Hi Cheskatlu
    The touch apps can be used with Creative Cloud but are sold separately, see this page http://www.adobe.com/products/creativecloud/tools-and-services.html
    Are these the apps you were referencing?
    -Dave

  • Java mapping for Remove and Add of  DOCTYPE Tag

    HI All,
    i have one issue while the Java mapping for Remove and Add of  DOCTYPE Tag   in Operation Mapping .
    it says that , while am testing in Configuration Test "  Problem while determining receivers using interface mapping: Error while determining root tag of XML"
    Receiver Determination...
    error in SXMB MOni
    " SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">CX_RD_PLSRV</SAP:Code>
      <SAP:P1>Problem while determining receivers using interface mapping: Error while determining root tag of XML: '<!--' or '<![CDATA[' expected</SAP:P1>
    plz provide solutions
    Thanks in advance.

    Hi Mahesh,
    I understand, you are using extended Receiver Determination using Operational Mapping (which has Java Mapping). And, there is an error message u201CError while determining root tag of XMLu201D, when you are doing configuration test.
    Can you please test, the Operational Mapping (which has Java Mapping) separately in ESR, with payload which is coming now. It should produce a XML something like this [Link1|http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce53aea0d7154ee10000000a421937/frameset.htm]
    <Receivers>
    <Receiver>
      <Party agency="016" scheme="DUNS">123456789</Party>
      <Service>MyService</Service>
    </Receiver>
    <Receiver>
      <Party agency="http://sap.com/xi/XI" scheme="XIParty"></Party>
      <Service>ABC_200</Service>
    </Receiver>
    </Receivers>
    If it is not (I Think it will not), then there is some problem in Java Mapping coding. Please correct it. Last option, if your Java code is small in length; you may paste it here, so that we can have a look at the cause of issue.
    Regards,
    Raghu_Vamsee

  • File Path for Windows and Linux

    hi can any one give solution how to implement code for odi file copy .
    i am using Same Code for Windows and Linux
    OdiFileCopy "-FILE=#Var_Lookup_File_Path \ Employee.csv" "-TOFILE=#Var_Lookup_File_Path_Backup\Employee.csv" "-RECURSE=NO" "-OVERWRITE=YES" "-CASESENS=NO"
    the problem of above code is
    it is working in windows but my Prod is Linux environment.
    in linux \ not works.. / will work
    please suggest how to concatnate variable and file without' \' '/'

    Thanks Phani
    i think in OS command also we may give path like #variable\File Name.
    So how it will replace \ with / in Linux.
    Could you give code for my Scenario..
    Thanks for helping

  • SharePoint 2013 disable Save/ Share or Print option in Office Web Apps for PDF and Word Docs

    Hi,
    How can we disable Save/ Share or Print option in Office Web Apps for Word and PDF files.
    Regards,

    Rights Management Server/Service
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Oracle10G and oracle11gr1 for windows and Linux

    Hi
    Can you help me in getting these Softwares
    Oracle10G and oracle11gr1 for windows and Linux ,I am unable to get them .
    Thanks in advance
    Sanjeev Sen

    Oracle10G NOT SUPPORTED ANYMORE,NO SOFTWARE AVAILABLE TO DOWNLOAD TOO
    oracle11gr1 for windows and Linux > http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

  • InterMedia Java Classes for Servlets and JSPs and Netscape

    I am using the interMedia Java Classes for Servlets and JSPs to upload and retrieve multimedia data. I have found that it is much more performant in Internet Explorer (5.5) than in Netscape Communicator (4.7). In fact, I cannot upload images larger than 10K at all using netscape. However, the same image can be uploaded into the same application using IE. Is this a known issue?
    Thanks in advance.

    Hi,
    We have successfully uploaded multimedia data in the giga-byte range (Quicktime and AVI files) at the same speed with both the Netscape (4.7n) and MS IE (4.n and 5.n) browsers. One thing we have noticed is that its very important to set the manual proxy settings correctly if you have an environment with a proxy server. If you don't, then uploads can go via the proxy server and, for some reason, that seems to take considerably longer. For example, suppose you are in the www.xyzco.com domain and are connecting to a host named webserver.www.xyzco.com, then specify webserver and webserver.www.xyzco.com (to cover both cases) in the "Do not use proxy servers for..." box in the manual proxy server configuration screen. Also, if you're using a tool such as JDeveloper that uses the host IP address in the debugger environment, then you also need to add the numeric-based (nnn.nnn.nnn.nnn) IP address to this list.
    Hope this helps.
    In order to better understand the variety of ways in which our customers are using interMedia, we'd be very interested in knowing a little more about your application, the interMedia functionality that you are using, and how you are developing and deploying your application. If you are able to help us, please send a short email message with some information about your application, together with any comments you may have, to the Oracle interMedia Product Manager, Joe Mauro, at [email protected] Thank you!
    Regards,
    Simon
    null

  • How run app for customers and how to send dunning notice to vendors

    Hi experts.
    Can any one help on following issue with example scenarios.
    how run app for customers and how to send dunning notice to vendors

    Hi,dear
    you should enter customer account numbers in f110 for payment receiving from customer, and assign dunning procedure to vendor master record and process the dunning to vendor by using f150.
    regards,
    nagesh.

  • How process app for customers, and how to send dunning notice to vendors

    Hi experts,
    can any one help on this
    how process app for customers, and how to send dunning notice to vendors
    Thanks & regards,
    vinod
    Moderator: Please, read and respect SDN rules

    Hi,dear
    you should enter customer account numbers in f110 for payment receiving from customer, and assign dunning procedure to vendor master record and process the dunning to vendor by using f150.
    regards,
    nagesh.

  • Applet colors for Mac and Linux?!

    I've got an applet where I use Color(int, int, int) to set background colors of components. Running the applet on Windows in Netscape or Explorer gives the expected colors. But in Mac and Linux the backgrounds are only white (using Netscape or Explorer).
    Does anybody know why, and how I could set colors to be shown also for Mac and Linux?
    /Johan

    I doesn't seem to help using predefined colors, like 'red', 'blue', etc...

  • I purchased apps for Ipad and can't find them

    I had purchased an ipad and bought a bunch of apps for it, and was hoping some would transfer over to our new Mac if possible - but there is no trace of me purchasing them except on my bank statement. Where did they go? They are not on my "purchases" list.

    I have never used the Mac App store but I am pretty sure that iPad apps can only be purchases in iTunes or on the iPad itself. There are some iPad instructional apps in the Mac App Store. Is that what you mean?
    If you purchase something from the Mac App Store - without knowing for sure because I've never used it - I would guess that it downloads to the downloads folder on your Mac?
    iPad apps would transfer from the iPad into your itunes library on the Mac when you sync, but frankly I am pretty confused by what you actually did and what you want to know.

Maybe you are looking for