How to set "global" font?

Where must I change font type and / or style to take effect in whole applet? I do not want to do that for every item separately. If I set font for applet it does not effect in panels and other elements.
I am using Netbeans 5.5, Java 1.5.

Here's how I do it.
   * Overrides all the font settings from the LookAndFeel.  The default fonts
   * tend to be too small and to render poorly on an LCD monitor, even with
   * anti-aliasing.  This should be done before any GUI components are created.
  public static void fixFonts()
    // These components will use the user-specified monospaced font
    String[] monoFonts = {
      "ComboBox.font",
      "OptionPane.messageFont",
      "Spinner.font",
      "TextField.font",
      "FormattedTextField.font",
      "PasswordField.font",
      "TextArea.font"
    // Replace all these with the user-specified sans-serif font
    String[] sansFonts = {
      "Button.font",
      "ToggleButton.font",
      "RadioButton.font",
      "CheckBox.font",
      "ColorChooser.font",
      "Label.font",
      "List.font",
      "MenuBar.font",
      "MenuItem.font",
      "RadioButtonMenuItem.font",
      "CheckBoxMenuItem.font",
      "Menu.font",
      "PopupMenu.font",
      "OptionPane.font",
      "OptionPane.buttonFont",
      "Panel.font",
      "ProgressBar.font",
      "ScrollPane.font",
      "Viewport.font",
      "Slider.font",
      "TabbedPane.font",
      "Table.font",
      "TableHeader.font",
      "TitledBorder.font",
      "ToolBar.font",
      "ToolTip.font",
      "Tree.font"
    // These components will use the user-specified serif font
    String[] smallerFonts = {
      "Menu.acceleratorFont",
      "MenuItem.acceleratorFont",
      "RadioButtonMenuItem.acceleratorFont",
      "CheckBoxMenuItem.acceleratorFont"
    // These components will use the user-specified serif font
    String[] serifFonts = {
      "TextPane.font",
      "EditorPane.font"
    // These components will use the user-specified bold font
    String[] boldFonts = {
      "InternalFrame.titleFont"
    Font sansFont    = new Font("Bitstream Vera Sans",      Font.PLAIN, 12);
    Font smallerFont = new Font("Bitstream Vera Sans",      Font.PLAIN, 11);
    Font monoFont    = new Font("DejaVu Sans Mono",         Font.PLAIN, 14);
    Font boldFont    = new Font("Bitstream Vera Sans Bold", Font.PLAIN, 12);
    Font serifFont   = new Font("Bitstream Vera Serif",     Font.PLAIN, 12);
    UIDefaults defs = UIManager.getDefaults();
    for (String key : sansFonts)
      defs.put(key, sansFont);
    for (String key : smallerFonts)
      defs.put(key, smallerFont);
    for (String key : monoFonts)
      defs.put(key, monoFont);
    for (String key : boldFonts)
      defs.put(key, boldFont);
    for (String key : serifFonts)
      defs.put(key, serifFont);
    // Some L&F's use a hard-coded height for tree cells based on a 12-point
    // font.  Setting it to zero lets the cell renderer determine the height.
    if (sansFont.getSize() != 12)
      defs.put("Tree.rowHeight", 0);
    // Get rid of the bold fonts when using a Metal L&F.
    defs.put("swing.boldMetal", Boolean.FALSE);
  }

Similar Messages

  • How to set custom font family in qml label in black berry 10 os

    how to set custom font family in label text  qml in black berry 10 OS

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • How to set different font for a particular row in jtables?

    How to set different font size and font type for a particular row in jtable?

    More than enough sample code here:
    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    db

  • How to set the Font size of Label?????

    Hello everyone.
    I want to knoe how to set the Font size of the Label???
    Please help..
    Thanks a lot.
    Gloria

    Label myLabel = new Label("Hello World");
    //Font(String name, int style, int size)
    myLabel.setFont(new Font("Arial", Font.PLAIN, 12));

  • How to set the fonts in the user profile(very urgent)

    Hi All,
    Can anyone please tell how to set the fonts in the user profile.
    We have a requirement where currently all the data is being displayed in a font and the user want to change that font permanently.
    I hope you have got the requirement.
    Points will be surely awarded.
    Thank you.

    Hi,
    U can do this in SU02.
    Kishi.

  • Set global font size for the whole application.

    Is there a way of setting a font globally
    What I mean I want to set a font size for the whole application.
    Is this posable ??
    Thanks Craig

    After posting over 300 questions I would think you would be passed the "New to Java TechnologY" stage.
    The answer for Swing applications is yes this can be done.
    I don't know how to do it for AWT components.
    Since you posted the question in this forum (as oppose to the Swing forum for Swing related problems), I'm assuming this is an AWT related question and therefore I can't help you.

  • How to set the font of a table header?

    Hi,
    Is there a way to set the font of a table header? I do not mean how to change the header word but the font.
    Thanks
    Stephen

    Hi,
    for combobox in a table (I assume the combobox is shown un column 2, thus the index 1)
    oracle.jbo.uicli.jui.JUTableLOVEditor lovCellEditor = (oracle.jbo.uicli.jui.JUTableLOVEditor) jTable1.getColumnModel().getColumn(1).getCellEditor();
    lovCellEditor.getComponent().setFont(new Font("Arial",Font.BOLD,13));
    For the LOV panel this is a bit more complicated because you need to create a custom LOV panel as described in http://www.oracle.com/technology/products/jdev/howtos/10g/jclientlov/customadfjclientlovpanel.html
    I filed a bug today to expose the component on a LOV to public so they can be modified
    Frank

  • How to set the font of label in ColumnChart correctly?

    hello, everybody
    By flex sdk 4.1.0, 4.5.1,
    the same source but two effects of font of label of ColumnChart will be displayed.
    .mxml:
    <!-- mxml start -->
    <?xml version="1.0" encoding="utf-8"?>
    <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:s="library://ns.adobe.com/flex/spark"
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       width="100%" height="100%"
                       styleName="backgroundChart" xmlns:local="*" xmlns:common="common.*">
        <fx:Declarations>
            <s:SolidColorStroke id="white" weight="1" color="#CCCCCC"/>
        </fx:Declarations>
        <s:Label text="" id="titleLabel" textAlign="left" styleName="graphLabel" x="10" y="10" width="100%" height="40" visible="true"/>
        <mx:Legend id="ch01Legend" direction="horizontal" dataProvider="{mainChart}" height="100%" width="100%" x="30" y="30" styleName="myLegend1"/>
        <!-- Define custom Strokes. -->
        <mx:ColumnChart id="mainChart" showDataTips="true" x="20" y="60" width="100%" height="100%" dataTipFunction="dataTip">
            <mx:backgroundElements>
                <mx:GridLines horizontalChangeCount="1" gridDirection="horizontal">
                    <mx:horizontalStroke>{white}</mx:horizontalStroke>
                </mx:GridLines>
            </mx:backgroundElements>
            <mx:verticalAxisRenderers>
                <mx:AxisRenderer axis="{linearAxis}" showLine="true" showLabels="true" styleName="myAxisStyle1">
                    <mx:axisStroke>{white}</mx:axisStroke>
                </mx:AxisRenderer>
            </mx:verticalAxisRenderers>
            <mx:verticalAxis>
                <mx:LinearAxis id="linearAxis"
                               minimum="0"
                               autoAdjust="true"
                               title="Unit"
                               />
            </mx:verticalAxis>
            <mx:horizontalAxisRenderers>
                <mx:AxisRenderer id="horizonLabel" labelRotation="45" axis="{ch01_a2}" showLine="true" showLabels="true" styleName="myAxisStyle3">
                    <mx:axisStroke>{white}</mx:axisStroke>
                </mx:AxisRenderer>
            </mx:horizontalAxisRenderers>
            <mx:horizontalAxis>
                <mx:CategoryAxis id="ch01_a2"
                                 dataProvider="{mainChart}"
                                 title="Period"
                                 categoryField="Period"
                                 />               
            </mx:horizontalAxis>
        </mx:ColumnChart>
    </s:BorderContainer>
    <!-- mxml end -->
    .css
    <!-- css start -->
    .myAxisStyle1 {
        placement:bottom;
        minorTickPlacement:none;
        tickLength:5;
        tickPlacement:none;
        color:#FFFFFF;
        verticalAxisTitleAlignment:vertical;
        fontFamily: Arial_AFE;
    .myAxisStyle3 {
        placement:bottom;
        minorTickPlacement:inside;
        tickLength:5;
        tickPlacement:inside;
        color:#FFFFFF;
        fontFamily: Arial_AFE;
    @font-face {
        src:url("font/arial.ttf");
        fontFamily: Arial_AFE;
        embedAsCFF: false;
    <!-- css end -->
    environment:
    flex sdks->4.1.0
    chart image:
    the font looks like "Arial"
    environment:
    flex sdks->4.5.1
    chart image:
    the font looks like "Times New Roman"
    Working at flex sdks 4.5.1,
    the labelClass can be set to 'spark.components.Label'(defalut) or 'mx.controls.Label',
    it seems that we can set labelClass to mx.controls.Label to get the same effect of font of label in ColumnChart when flex sdks->4.5.1
                <mx:AxisRenderer axis="{linearAxis}" showLine="true" showLabels="true" styleName="myAxisStyle1" labelClass="mx.controls.Label">
                <mx:AxisRenderer id="horizonLabel" labelRotation="45" axis="{ch01_a2}" showLine="true" showLabels="true" styleName="myAxisStyle3" labelClass="mx.controls.Label">
    but it also causes a memory leak.
    1) Can anyone tell me how to show the font of label of ColumnChart correctly (looks like "Arial") when using the labelClass 'spark.components.Label' ?
    2) Can anyone tell me how to solve the memory leak when using the labelClass 'mx.controls.Label'?

    Hi,
    for combobox in a table (I assume the combobox is shown un column 2, thus the index 1)
    oracle.jbo.uicli.jui.JUTableLOVEditor lovCellEditor = (oracle.jbo.uicli.jui.JUTableLOVEditor) jTable1.getColumnModel().getColumn(1).getCellEditor();
    lovCellEditor.getComponent().setFont(new Font("Arial",Font.BOLD,13));
    For the LOV panel this is a bit more complicated because you need to create a custom LOV panel as described in http://www.oracle.com/technology/products/jdev/howtos/10g/jclientlov/customadfjclientlovpanel.html
    I filed a bug today to expose the component on a LOV to public so they can be modified
    Frank

  • SQ01 (How to set Global Area as default)

    Hi All
    In SQ01, i find 2 environments in Query Areas - Global Area & Standard Area. Everytime i execute SQ01 transaction, it takes me to Standard Area, then i have to change it to Global Area & then select the user group. I would like to know how i can set Global Area as default & also a particular user group, so that everytime i run SQ01, it directly takes me to Global Area & the particular user group, so i can execute my query directly instead of having to change it each time.
    Hope my problem is clear, await inputs.
    Vivek

    Hello Vivek,
    You need to maintian some default parameters in your User master record.
    Parameter ID :
    AQB for User Group
    AQW for Query Area.
    Select the AQB from the drop-down and give your default user group in the parameter value.
    Regards,
    Naimesh Patel

  • Firefox 4 multi user environment in linux: How to set global settings?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/826921]</blockquote><br>
    Hi,
    We used to be able to change settings in all.js file in FF 3.x.x platform, for changing settings like, proxy, authentication, etc. We installed FF 4.0.1 in linux, but, I can't find the all.js file to change any of the global settings in FF 4.0.1.
    Could you please point me how to changeglobal settings in FF 4.x version?
    thanks in advance.

    Hi. A JDBC connection pool is a set of identical, interchangeable, pre-made
    connections, and the controls to make sure only one user uses a particular
    connection at any one time. If you want to have different DBMS users, you can
    have a separate pool for each DBMS user, which may contain as many or few
    connections as you want. Some applications has a pool for the accounting
    applications, and another for the sales applications etc. Some do have a
    separate pool for john, jane, joe etc, each with one connection. Pools
    can be created and destroyed dynamically using the dynamic pool API.
    Joe
    softstar wrote:
    >
    Hi all,
    I need to know how to set Multi User Environment in the weblogic 5.1
    properties file..
    Here my question is..:)
    1) I have a database with multiple users and having different privileges
    for the users.. and i need to use all the privileges when user aceess
    the database through weblogic server connectionPool.
    2)According to the user privileges i need access the database tables
    content and gives the frontEnd(jsp).
    3)How to modify dynamically weblogic.properties file in the weblogic
    5.1.
    If anybody having idea reg. this issues pl...help me..
    Thanks in advance
    Chandu([email protected],[email protected])

  • How to set the font size on only one object!

    I wonder how i could programmatically set the font size on only one object?
    Igor Stojčević

    Hello,
    You can use the builtin SRW.SET_FONT_SIZE
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/plsql/builtins/srw/srw_set_font_size.htm
    in the Format trigger
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/plsql/triggers/tr_format_trigger.htm
    Regards

  • How to set global transactions for XA.

    Hello,
    I have configured 9i RAC active/active database into a active/passive.
    The users were not able to connect using XA drivers.
    I have run the xaview.sql script as sys in @O_H/rdbms/admin and granted select privs as below.
    grant select on v$xatrans$ to public;
    grant select on pending_trans$ to public;
    grant select on dba_2pc_pending to public;
    grant select on dba_pending_transactions to public;
    Still users are not able to connect to the databases using XA drivers.
    What is needed more to be set up on the database side?
    Can any one let me know the detailed method to set global transactions(that is what I was told needs to be set up) on the oracle database.
    Thanks
    SKH

    Further to give more info the error users are facing is
    Could not connect to 'oracle.jdbc.xa.client.OracleXADataSource'.

  • How to set multi fonts in one textItem?

    I have a textItem with Chinese & English. I want to set Chinese and English in different fonts, but the script can only set one font. So, when I set the textItem in western fonts, the Chinese can't display correctly (display block). When I set it to Chinese fonts, the English letters display in Chinese font.
    Is there anyway to fix this problem?
    I use the Photoshop's original tools to set Chinese font first and set western font again, the font of English letters in textItem will change to the western font and the Chinese text will keep the Chinese font I set first time. I wonder is there the same way to set font with script?
    Thx guys.

    This might serve as an example:
    // create a type layer with more than one font;
    // 2013, use at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var theText = [
    ["this is a text", 12, "Helvetica"],
    ["this is another font", 15, "Times-Roman"]
    // create;
    createPointTextMoreCompl (theText, 50, 50);
    ////// create point text layer //////
    function createPointTextMoreCompl (theArray, theX, theY) {
    if (theArray[0].length > 0) {
    // join the texts;
    var theText =  new String;
    for (var m = 0; m < theArray.length; m++) {
    theText = theText + " " + theArray[m][0]
    // =======================================================
    var idMk = charIDToTypeID( "Mk  " );
        var desc4 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref2 = new ActionReference();
            var idTxLr = charIDToTypeID( "TxLr" );
            ref2.putClass( idTxLr );
        desc4.putReference( idnull, ref2 );
        var idUsng = charIDToTypeID( "Usng" );
            var desc5 = new ActionDescriptor();
            var idTxt = charIDToTypeID( "Txt " );
    // text;
            desc5.putString( idTxt, theText );
            var idwarp = stringIDToTypeID( "warp" );
                var desc6 = new ActionDescriptor();
                var idwarpStyle = stringIDToTypeID( "warpStyle" );
                var idwarpStyle = stringIDToTypeID( "warpStyle" );
                var idwarpNone = stringIDToTypeID( "warpNone" );
                desc6.putEnumerated( idwarpStyle, idwarpStyle, idwarpNone );
                var idwarpValue = stringIDToTypeID( "warpValue" );
                desc6.putDouble( idwarpValue, 0.000000 );
                var idwarpPerspective = stringIDToTypeID( "warpPerspective" );
                desc6.putDouble( idwarpPerspective, 0.000000 );
                var idwarpPerspectiveOther = stringIDToTypeID( "warpPerspectiveOther" );
                desc6.putDouble( idwarpPerspectiveOther, 0.000000 );
                var idwarpRotate = stringIDToTypeID( "warpRotate" );
                var idOrnt = charIDToTypeID( "Ornt" );
                var idHrzn = charIDToTypeID( "Hrzn" );
                desc6.putEnumerated( idwarpRotate, idOrnt, idHrzn );
            var idwarp = stringIDToTypeID( "warp" );
            desc5.putObject( idwarp, idwarp, desc6 );
    // position;
            var idTxtC = charIDToTypeID( "TxtC" );
                var desc7 = new ActionDescriptor();
                var idHrzn = charIDToTypeID( "Hrzn" );
                var idPrc = charIDToTypeID( "#Prc" );
                desc7.putUnitDouble( idHrzn, idPrc, theX );
                var idVrtc = charIDToTypeID( "Vrtc" );
                var idPrc = charIDToTypeID( "#Prc" );
                desc7.putUnitDouble( idVrtc, idPrc, theY );
            var idPnt = charIDToTypeID( "Pnt " );
            desc5.putObject( idTxtC, idPnt, desc7 );
            var idtextGridding = stringIDToTypeID( "textGridding" );
            var idtextGridding = stringIDToTypeID( "textGridding" );
            var idNone = charIDToTypeID( "None" );
            desc5.putEnumerated( idtextGridding, idtextGridding, idNone );
            var idOrnt = charIDToTypeID( "Ornt" );
            var idOrnt = charIDToTypeID( "Ornt" );
            var idHrzn = charIDToTypeID( "Hrzn" );
            desc5.putEnumerated( idOrnt, idOrnt, idHrzn );
            var idAntA = charIDToTypeID( "AntA" );
            var idAnnt = charIDToTypeID( "Annt" );
            var idantiAliasSharp = stringIDToTypeID( "antiAliasSharp" );
            desc5.putEnumerated( idAntA, idAnnt, idantiAliasSharp );
            var idtextShape = stringIDToTypeID( "textShape" );
                var list1 = new ActionList();
                    var desc8 = new ActionDescriptor();
                    var idTEXT = charIDToTypeID( "TEXT" );
                    var idTEXT = charIDToTypeID( "TEXT" );
                    var idPnt = charIDToTypeID( "Pnt " );
                    desc8.putEnumerated( idTEXT, idTEXT, idPnt );
                    var idOrnt = charIDToTypeID( "Ornt" );
                    var idOrnt = charIDToTypeID( "Ornt" );
                    var idHrzn = charIDToTypeID( "Hrzn" );
                    desc8.putEnumerated( idOrnt, idOrnt, idHrzn );
                    var idTrnf = charIDToTypeID( "Trnf" );
                        var desc9 = new ActionDescriptor();
                        var idxx = stringIDToTypeID( "xx" );
                        desc9.putDouble( idxx, 1.000000 );
                        var idxy = stringIDToTypeID( "xy" );
                        desc9.putDouble( idxy, 0.000000 );
                        var idyx = stringIDToTypeID( "yx" );
                        desc9.putDouble( idyx, 0.000000 );
                        var idyy = stringIDToTypeID( "yy" );
                        desc9.putDouble( idyy, 1.000000 );
                        var idtx = stringIDToTypeID( "tx" );
                        desc9.putDouble( idtx, 0.000000 );
                        var idty = stringIDToTypeID( "ty" );
                        desc9.putDouble( idty, 0.000000 );
                    var idTrnf = charIDToTypeID( "Trnf" );
                    desc8.putObject( idTrnf, idTrnf, desc9 );
                    var idrowCount = stringIDToTypeID( "rowCount" );
                    desc8.putInteger( idrowCount, 1 );
                    var idcolumnCount = stringIDToTypeID( "columnCount" );
                    desc8.putInteger( idcolumnCount, 1 );
                    var idrowMajorOrder = stringIDToTypeID( "rowMajorOrder" );
                    desc8.putBoolean( idrowMajorOrder, true );
                    var idrowGutter = stringIDToTypeID( "rowGutter" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc8.putUnitDouble( idrowGutter, idPnt, 0.000000 );
                    var idcolumnGutter = stringIDToTypeID( "columnGutter" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc8.putUnitDouble( idcolumnGutter, idPnt, 0.000000 );
                    var idSpcn = charIDToTypeID( "Spcn" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc8.putUnitDouble( idSpcn, idPnt, 0.000000 );
                    var idframeBaselineAlignment = stringIDToTypeID( "frameBaselineAlignment" );
                    var idframeBaselineAlignment = stringIDToTypeID( "frameBaselineAlignment" );
                    var idalignByAscent = stringIDToTypeID( "alignByAscent" );
                    desc8.putEnumerated( idframeBaselineAlignment, idframeBaselineAlignment, idalignByAscent );
                    var idfirstBaselineMinimum = stringIDToTypeID( "firstBaselineMinimum" );
                    var idPnt = charIDToTypeID( "#Pnt" );
                    desc8.putUnitDouble( idfirstBaselineMinimum, idPnt, 0.000000 );
                    var idbase = stringIDToTypeID( "base" );
                        var desc10 = new ActionDescriptor();
                        var idHrzn = charIDToTypeID( "Hrzn" );
                        desc10.putDouble( idHrzn, 0.000000 );
                        var idVrtc = charIDToTypeID( "Vrtc" );
                        desc10.putDouble( idVrtc, 0.000000 );
                    var idPnt = charIDToTypeID( "Pnt " );
                    desc8.putObject( idbase, idPnt, desc10 );
                var idtextShape = stringIDToTypeID( "textShape" );
                list1.putObject( idtextShape, desc8 );
            desc5.putList( idtextShape, list1 );
            var idTxtt = charIDToTypeID( "Txtt" );
                var list2 = new ActionList();
                    var desc11 = new ActionDescriptor();
                    var idFrom = charIDToTypeID( "From" );
    // from;
                    desc11.putInteger( idFrom, 0 );
                    var idT = charIDToTypeID( "T   " );
    // to;
                    desc11.putInteger( idT, theArray[0][0].length + 1);
                    var idTxtS = charIDToTypeID( "TxtS" );
                        var desc12 = new ActionDescriptor();
                        var idstyleSheetHasParent = stringIDToTypeID( "styleSheetHasParent" );
                        desc12.putBoolean( idstyleSheetHasParent, true );
                        var idfontPostScriptName = stringIDToTypeID( "fontPostScriptName" );
    // font;
                        desc12.putString( idfontPostScriptName, theArray[0][2] );
    /*                    var idFntN = charIDToTypeID( "FntN" );
                        desc12.putString( idFntN, """Arial""" );
                        var idFntS = charIDToTypeID( "FntS" );
                        desc12.putString( idFntS, """Regular""" );*/
                        var idScrp = charIDToTypeID( "Scrp" );
                        desc12.putInteger( idScrp, 0 );
                        var idFntT = charIDToTypeID( "FntT" );
                        desc12.putInteger( idFntT, 1 );
                        var idSz = charIDToTypeID( "Sz  " );
                        var idPnt = charIDToTypeID( "#Pnt" );
    // size;
    //                    desc12.putUnitDouble( idSz, idPnt, theArray[0][1] * (Math.random() * 0.4 + 0.8) );
                        desc12.putUnitDouble( idSz, idPnt, theArray[0][1] );
                        var idTrck = charIDToTypeID( "Trck" );
                        desc12.putInteger( idTrck, 15 );
                        var iddigitSet = stringIDToTypeID( "digitSet" );
                        var iddigitSet = stringIDToTypeID( "digitSet" );
                        var iddefaultDigits = stringIDToTypeID( "defaultDigits" );
                        desc12.putEnumerated( iddigitSet, iddigitSet, iddefaultDigits );
                        var idmarkYDistFromBaseline = stringIDToTypeID( "markYDistFromBaseline" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc12.putUnitDouble( idmarkYDistFromBaseline, idPnt, 5.760000 );
                        var idtextLanguage = stringIDToTypeID( "textLanguage" );
                        var idtextLanguage = stringIDToTypeID( "textLanguage" );
                        var idgermanLanguageReformedonenineninesix = stringIDToTypeID( "germanLanguageReformed1996" );
                        desc12.putEnumerated( idtextLanguage, idtextLanguage, idgermanLanguageReformedonenineninesix );
                        var idClr = charIDToTypeID( "Clr " );
                            var desc13 = new ActionDescriptor();
                            var idRd = charIDToTypeID( "Rd  " );
                            desc13.putDouble( idRd, 0 );
                            var idGrn = charIDToTypeID( "Grn " );
                            desc13.putDouble( idGrn, 0 );
                            var idBl = charIDToTypeID( "Bl  " );
                            desc13.putDouble( idBl, 0 );
                        var idRGBC = charIDToTypeID( "RGBC" );
                        desc12.putObject( idClr, idRGBC, desc13 );
                    var idTxtS = charIDToTypeID( "TxtS" );
                    desc11.putObject( idTxtS, idTxtS, desc12 );
                var idTxtt = charIDToTypeID( "Txtt" );
                list2.putObject( idTxtt, desc11 );
    // if more than one array;
    // add the string’s lengths;
    var theCounter = theArray[0][0].length + 1;
    for (var n = 1; n < theArray.length; n++) {
                    var desc14 = new ActionDescriptor();
                    var idFrom = charIDToTypeID( "From" );
    // from;
                    desc14.putInteger( idFrom, theCounter );
                    var idT = charIDToTypeID( "T   " );
    theCounter = theCounter + 1 + theArray[n][0].length;
    // to;
                    desc14.putInteger( idT, theCounter );
                    var idTxtS = charIDToTypeID( "TxtS" );
                        var desc15 = new ActionDescriptor();
                        var idstyleSheetHasParent = stringIDToTypeID( "styleSheetHasParent" );
                        desc15.putBoolean( idstyleSheetHasParent, true );
                        var idfontPostScriptName = stringIDToTypeID( "fontPostScriptName" );
    // font;
                        desc15.putString( idfontPostScriptName, theArray[n][2] );
                        var idScrp = charIDToTypeID( "Scrp" );
                        desc15.putInteger( idScrp, 0 );
                        var idFntT = charIDToTypeID( "FntT" );
                        desc15.putInteger( idFntT, 0 );
                        var idSz = charIDToTypeID( "Sz  " );
                        var idPnt = charIDToTypeID( "#Pnt" );
    // size;
                        desc15.putUnitDouble( idSz, idPnt, theArray[n][1] );
                        var idTrck = charIDToTypeID( "Trck" );
                        desc15.putInteger( idTrck, 15 );
                        var iddigitSet = stringIDToTypeID( "digitSet" );
                        var iddigitSet = stringIDToTypeID( "digitSet" );
                        var iddefaultDigits = stringIDToTypeID( "defaultDigits" );
                        desc15.putEnumerated( iddigitSet, iddigitSet, iddefaultDigits );
                        var idmarkYDistFromBaseline = stringIDToTypeID( "markYDistFromBaseline" );
                        var idPnt = charIDToTypeID( "#Pnt" );
                        desc15.putUnitDouble( idmarkYDistFromBaseline, idPnt, 5.760000 );
                        var idtextLanguage = stringIDToTypeID( "textLanguage" );
                        var idtextLanguage = stringIDToTypeID( "textLanguage" );
                        var idgermanLanguageReformedonenineninesix = stringIDToTypeID( "germanLanguageReformed1996" );
                        desc15.putEnumerated( idtextLanguage, idtextLanguage, idgermanLanguageReformedonenineninesix );
                        var idClr = charIDToTypeID( "Clr " );
                            var desc16 = new ActionDescriptor();
                            var idRd = charIDToTypeID( "Rd  " );
                            desc16.putDouble( idRd, 0 );
                            var idGrn = charIDToTypeID( "Grn " );
                            desc16.putDouble( idGrn, 0 );
                            var idBl = charIDToTypeID( "Bl  " );
                            desc16.putDouble( idBl, 0 );
                        var idRGBC = charIDToTypeID( "RGBC" );
                        desc15.putObject( idClr, idRGBC, desc16 );
                    var idTxtS = charIDToTypeID( "TxtS" );
                    desc14.putObject( idTxtS, idTxtS, desc15 );
                var idTxtt = charIDToTypeID( "Txtt" );
                list2.putObject( idTxtt, desc14 );
            desc5.putList( idTxtt, list2 );
            var idparagraphStyleRange = stringIDToTypeID( "paragraphStyleRange" );
                var list3 = new ActionList();
                    var desc17 = new ActionDescriptor();
                    var idFrom = charIDToTypeID( "From" );
                    desc17.putInteger( idFrom, 0 );
                    var idT = charIDToTypeID( "T   " );
    // to;
                    desc17.putInteger( idT, theText.length*2);
                    var idparagraphStyle = stringIDToTypeID( "paragraphStyle" );
                        var desc18 = new ActionDescriptor();
                        var idstyleSheetHasParent = stringIDToTypeID( "styleSheetHasParent" );
                        desc18.putBoolean( idstyleSheetHasParent, true );
                        var idAlgn = charIDToTypeID( "Algn" );
                        var idAlg = charIDToTypeID( "Alg " );
                        var idCntr = charIDToTypeID( "Cntr" );
                        desc18.putEnumerated( idAlgn, idAlg, idCntr );
                        var idhyphenate = stringIDToTypeID( "hyphenate" );
                        desc18.putBoolean( idhyphenate, true );
                        var idhyphenateWordSize = stringIDToTypeID( "hyphenateWordSize" );
                        desc18.putInteger( idhyphenateWordSize, 8 );
                        var idhyphenatePreLength = stringIDToTypeID( "hyphenatePreLength" );
                        desc18.putInteger( idhyphenatePreLength, 3 );
                        var idhyphenatePostLength = stringIDToTypeID( "hyphenatePostLength" );
                        desc18.putInteger( idhyphenatePostLength, 3 );
                        var idhyphenateLimit = stringIDToTypeID( "hyphenateLimit" );
                        desc18.putInteger( idhyphenateLimit, 2 );
                        var idhyphenationZone = stringIDToTypeID( "hyphenationZone" );
                        desc18.putDouble( idhyphenationZone, 36.000000 );
                        var idhyphenateCapitalized = stringIDToTypeID( "hyphenateCapitalized" );
                        desc18.putBoolean( idhyphenateCapitalized, true );
                        var idburasagari = stringIDToTypeID( "burasagari" );
                        var idburasagari = stringIDToTypeID( "burasagari" );
                        var idburasagariStandard = stringIDToTypeID( "burasagariStandard" );
                        desc18.putEnumerated( idburasagari, idburasagari, idburasagariStandard );
                        var idtextEveryLineComposer = stringIDToTypeID( "textEveryLineComposer" );
                        desc18.putBoolean( idtextEveryLineComposer, true );
                    var idparagraphStyle = stringIDToTypeID( "paragraphStyle" );
                    desc17.putObject( idparagraphStyle, idparagraphStyle, desc18 );
                var idparagraphStyleRange = stringIDToTypeID( "paragraphStyleRange" );
                list3.putObject( idparagraphStyleRange, desc17 );
            desc5.putList( idparagraphStyleRange, list3 );
            var idkerningRange = stringIDToTypeID( "kerningRange" );
                var list4 = new ActionList();
            desc5.putList( idkerningRange, list4 );
        var idTxLr = charIDToTypeID( "TxLr" );
        desc4.putObject( idUsng, idTxLr, desc5 );
    executeAction( idMk, desc4, DialogModes.NO );

  • How to set the font size in JOptionPane?

    I use a JOptionPane.showOptionDialog in a JClient form.
    Can I set the font size of the message in my JOptionPane?
    And also, can I set the location for each component in JOptionPane?

    The best way to do that is to create a seperate panel with its components in it (a JLabel with a specific font setting) and display that panel as the JOptionPane's message.
    As for the OK/Cancel/etc buttons, I don't think you'll be able to rearange them, without hacking into the JOptionPane class' source.

  • [CS2/CS3 JS] How to set Default Font for multiple documents

    Hello,
    How do I set the default font for any new text frames I create.
    I have several thousand InDesign templates in which the default font is set to a font that is no longer licenced and therefore requires changing.
    I already have a script which will open each template and change the first insertion point of any (empty) text frame to a new font but any new text frames created in these templates still want to use the unlicensed font.
    Thanks for any assistance.
    Simon Kemp

    for existing documents:
    app.activeDocument.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');
    for newly created ones:
    app.textDefaults.appliedFont = myDoc.fonts.itemByName ('Arial\tBold');

Maybe you are looking for

  • T.CODE:OB52 Problem

    Hi Now you at Quality server for Unit testing and Integration testing but problem is when you are using T.Code:-OB52 its showing display mode so you cannot open and closed posting periods. What is the problem is in fianance moduel or basis module cou

  • Why does the calendar not show dots since the IOS 6 upgrade

    Since I upgraded to IOS 6 the dots don't appear on the calendar when looking at the monthly view.  Is there a setting for this that needs changing?

  • Query not able to Retrieve Summary Level Member

    Dear all, I have created a Planning application on BPC Netweaver 10.0. I am trying to retrieve the Planning Data via BEx Query in Dashboard. My Account dimension is hierarchical and I want the dashboard users to be able to select summary account when

  • My Mac Os x v10.7.4 with HP Deskjet F4580 printer. Help???!!

    According to HP, my Mac Os x v10.7.4 is compatible with their HP Deskjet F4580 printer, however when trying to add the printer in my computer, it says "no available softwares at this time". The HP Support website said that donwloads are not necessary

  • Select Multiple emails

    I have a Z10 how do I select multiple emails?