How to specify the font in a JList?

My application has four columns of data represented in a JList. The default font style does proportional spacing.
I need to specify a fixed width font to control column alignment in the JList. Unless there's something like tab positions? If I can specify a fixed width font, I can format the display strings appropriately.
I think I need to use a cell renderer to control the actual drawing of each cell in the JList?
Also, where do I find a list of the font types?
Thanks in advance!

I don't think you need a cell renderer. You find out how to specify font names by (oddly enough) looking in the API documentation for the Font class; the info for the most usable-looking constructor tells you what you want to know.

Similar Messages

  • How to change the font size in sap scripts?

    hi friends,
        i had a query regarding to SAPSCRIPT.
      how to change the font size of a text in sap script form in which it should change it  dynamically.
    is it possible to change the font size dynamically in scripts.
    one more query regarding to this only.
    i need to get the hard copy of a script .
    what is the transaction code to get the hard copy?

    Hi venkata,
    You can specify the font size either in the Character format or pharagraph format.
    You better decide it according to your requirement.  If you want to apply the same font size for the entire form create the Paragraph format and give the paragraph format in the default paragraph format.
    If you want to apply that to limited text, then create character format.
    The process of creating it is just after going inside paragraph format click EDIT-> Create Element and give the font size.
    This applies for character format also.
    Reward points if useful.
    Thanks,
    karthik

  • How to increase the font size of the report output in the printout.

    Hi Team,
    i have a requirement like to print the report output as a direct print from an internal table.I am using the below mentioned code, the output is printing fine but the Font size of the output text is so small so i need to increase the font size of the text of output data.
    call function 'GET_PRINT_PARAMETERS'
       exporting
         immediately                    = 'X'
         line_count                     = 65
         line_size                      = 320
         mode                           = 'CURRENT'
         no_dialog                      = ' '
         release                        = 'X'
         user                           = sy-uname
       importing
         out_parameters                 = st_param
       exceptions
         archive_info_not_found         = 1
         invalid_print_params           = 2
         invalid_archive_params         = 3
         others                         = 4.
      if sy-subrc eq 0.
        new-page print on parameters st_param no dialog.
    could you please suggest me how to increase the font size while printing the report output..
    Thanks in Advance.
    Puneet.

    hey,
    in our system when we click on print. on widow is coming.
    there is a properties button.
    we click on it.
    there FORMAT----AND then we select forat from there and then printing .
    not sure. but check on ur system. is there properites button.
    HI,
    READ THIS,
    You can specify attributes such as the character width and font size in the device type formatting yourself.
    contact ur basis team .
    in the report PRINT-CONTROL SIZE option is there. try to find more o this.

  • How to specify 'Chinese' font?

    Hi,
    I can programatically generate a PDF document with English characters.
    I can programatically generate a PDF document containing Japanese characters.
    BUT...I cannot get 'CHinese' characters to work.
    For Japanese I specify the fonts as follows...
    4 0 obj<< /Type /Font /Subtype /Type0 /Name /F1 /BaseFont /MS-Mincho /DescendantFonts [ 5 0 R] /Encoding /90ms-RKSJ-H >>endobj
    5 0 obj<< /Type /Font /Subtype /CIDFontType0 /BaseFont /MS-Mincho /FontDescriptor 6 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Japan1) /Supplement 2 >> /DW 1000 /W [231 324 500 326 389 500] >>endobj
    6 0 obj<< /FontName /MS-Mincho /Descent 0 /FontBBox [ 0 0 1000 1000 ] /CapHeight 1000 /Ascent 1000 /StemV 100 /Flags 4 /ItalicAngle 0 /Type /FontDescriptor >>endobj
    ...how do I specify 'Chinese'?
    Kind regards,
    Simon

    Hi Leonard,
    I found the solution. Hurrah!
    I was able to set the width (spacing) of the Latin glyphs, without affecting Chinese glyphs.
    *** In the problematic PDF the font was defined as follows:
    4 0 obj<< /Type /Font /Subtype /Type0 /Name /F1 /BaseFont /SimSun /DescendantFonts [ 5 0 R] /Encoding /GB-EUC-H >>endobj
    5 0 obj<< /Type /Font /Subtype /CIDFontType0 /BaseFont /SimSun /FontDescriptor 6 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (GB1) /Supplement 2 >> /DW 1000 >>endobj
    6 0 obj<< /FontName /SimSun /Descent 0 /FontBBox [ 0 0 0 0] /CapHeight 1000 /Ascent 1000 /StemV 100 /Flags 4 /ItalicAngle 0 /Type /FontDescriptor >>endobj
    *** In mysolution PDF I have defined my font as follows:
    4 0 obj<< /Type /Font /Subtype /Type0 /Name /F1 /BaseFont /SimSun /DescendantFonts [ 5 0 R] /Encoding /GB-EUC-H >>endobj
    5 0 obj<< /Type /Font /Subtype /CIDFontType0 /BaseFont /SimSun /FontDescriptor 6 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (GB1) /Supplement 2 >>
    /DW 1000 /DW 1000 /W [1 95 500 814 907 500 7712 7716 500] >>endobj
    6 0 obj<< /FontName /SimSun /Descent 0 /FontBBox [ 0 0 0 0] /CapHeight 1000 /Ascent 1000 /StemV 1000 /Flags 4 /ItalicAngle 0 /Type /FontDescriptor >>endobj
    * Notice the additional entry /W [1 95 500 814 907 500 7712 7716 500].
    This sets the CIDs 1-95, 814-907 and 7712-776 to be 500, which is half the DW value of 1000.
    *** How did I determine the CIDs of the Latin characters?
    The answer was located in 'Adobe CJKV Character
    Collections and CMaps for
    CID-Keyed Fonts', (see http://partners.adobe.com/public/developer/en/font/5094.CJK_CID.pdf).
    See section 2.1:
    "...Supplement 0 (zero) of Adobe-GB1 enumerates 7,717 glyphs (CIDs 0
    through 7716), provides support for the GB 2312-80 and GB 1988-89
    character set standards, incorporates corrections and additions specified in
    GB 6345.1-86, and includes vertical glyphs specified in GB/T 12345-90.
    CIDs 195 and 77127715 are proportional-width Latin glyphs; and CIDs
    814907 and 7716 are half-width Latin glyphs.".
    Kind regards,
    Simon

  • How to change the font size and style on run time

    dear all
    i try to change the font style and font size on runtime. I did the following:
    1- i created an item(:font_size) in which i will write the size of the font for the the other item ('customer_name')
    2 on the post_change trigger for 'font_size' i write this code
    SET_ITEM_PROPERTY('customer_name',FONT_size,(:font_size);
    i write 12 then then font size changed , then i write 18 , the size does not change. and when i write any value , no change happens. I do not know why
    the second problem is how to change the font style
    i made three checkbooks (bold,italic,underline)
    on the trugger when_checkbox_checked i write
         IF :BOLD = 'B' THEN
         SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'BOLD');
         ELSE
    SET_ITEM_PROPERTY('N_SAMPLE',FONT_STYLE,'REGULAR');
         END IF;     
    no change happend at all.
    please help

    Hi friend,
    it's a really really strange tip... May be it's a Forms bug? I've tried with set_item_property..and.. you're right, it doesn't work..
    So.. you can try making this:
    - create a visual attribute with an specific font size....
    - use the
    SET_ITEM_INSTANCE_PROPERTY('block.item',CURRENT_RECORD,VISUAL_ATTRIBUTE,'you_visual_attribute');
    and call it from psot-change....
    It works
    Hope it helps,
    Jose.

  • How to Change the Font Type for Printing Pocket Address Book?

    I am new to the Mac and was entering in my contact info into the Address Book in hope of creating a Pocket Address Book (PAB). When I attempt to print out the PAB the default font is courier. When I click on "set" and access other font types, sizes, etc., I can't seem to find a way to apply or save the font type that I choose. In short, it stays as courier. I found an archived thread in a forum that suggests to validate the font I want - which I did and it was already validated - and otherwise I cannot seem to change it from courier. Any help on how to get the font I select to be applied instead of courier would be GREATLY appreciated!

    You can also change it using the UIManager:
    UIManager.put("OptionPane.foreground", Color.red);
    UIManager.put("OptionPane.messageForeground", Color.red);
    For a complete list of all properties you can change for each component check out this program:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java

  • How to change the font dynamically in SAP script

    Hello,
    There are three fields for a line item to be printed in SAP form (Through Script). The font of one field has to be bigger than rest of the two.
    Can anybody tell me how to change the font of a specific field in a line of an SAP-script?
    Regards
    Kiran

    Hi,
    Its like any other character format. you can have any field with a character format.
    --Ragu

  • Please advice on how to remain the font in SAP

    Hi,
    Please advice on how to remain the font in SAP as Arial monospaced instead of its auto change to Chinese character.
    At the same time, pls advice the correct forum i should went as this is related to the Basis and i could not find out Basis Forum.
    Thanks.
    Best Regards,
    Joo

    Hi,
    when i went to the SAP Menu page right
    Below is the Menu list
    ==>Office
    ==>Cross-Application Components
    ==>Logistics
    ==>Accounting
    ==>Human REsources
    ==>Information Systems
    ==>Tools
    Over here, does not have "Setting". Pls advice.
    Thanks.

  • How to specify the target name while deploying a code in OSB-- Plz Help

    Hi all,
    Am working in creating a cluster environment. For my testing i created a new managed server(OSB_Server) in 9001 port in the admin console itself and that server started running. The default managed server(Admin_Server) is in 7001 port. So when i deploy a code in 7001 sb console the WSDL gets exposed in 7001 because the default admin server port is 7001. While deploying a code in service bus admin console we are not specifying the target name. So how to specify the target name while deploying the code in service bus admin console. Plz help me.
    Regards
    Prabhu

    Hi Prabhu,
    There are three kind of server architecture possible for OSB -
    1. Single server - Everything gets deployed on Admin server itself
    2. Admin Server + Single Managed Server for OSB -- OSB configuration gets deployed on OSB managed server. OSB resources (proxy service, WSDL, Schema) will remain available on OSB managed server port only and NOT on admin server port
    3. Admin Server + OSB cluster -- OSB configuration gets deployed on OSB cluster. OSB resources (proxy service, WSDL, Schema) will remain available on OSB Cluster port(s) only and NOT on admin server port
    Converting one type of server architecture to any other type, requires a manual tedious process, so it is suggested that you create domain accordingly i.e. if you need clusters then while creating domain itself, create OSB cluster, so that all OSB applications gets deployed to OSB cluster. I will suggest you to create a clustered domain from scratch and import the configuration from your existing domian to this new clustered domain.
    You may refer-
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15022/toc.htm
    Regards,
    Anuj

  • How to change the font of the text in Control Editor??

    How to change the font of the text in Control Editor??

    Hi,
            you have to create a smartstyle and acces that in So10 transaction.in change mode,menu->FORMAT->CHANGE STYLE.
    here you will get all styles available.
    so first you have to create a style in SE72 and activate it. and then
    goto SO10-> change mode
    menu->FORMAT->CHANGE STYLE.
    now you will see the style you have created. select that.
    now you can see the format.
    <b>Reward points</b>
    Regards

  • How to change the font size of text and case in smartforms

    hi,
       could any one explain how to change the font size of text in smartforms. ex. previously i had taken P4 left aligned and C6 but now i want to decrease the font without making it bold. pl......... guide me
       secondly the value which are coming from tables are upper case but i need lower case. pl. guide
    thanking u

    check out the smart styles...create a font of ur size n use.
    Define the paragraphs & character formats using SMARTSTYLES & use them in your smartform.
    You have to give the smartstyle name in the Form attributes-->Output options for the formats to be used in your smartform.
    You can define font size in Smartform Style.
    Smartform Styles > Charcterformat> Font --> size.
    to load the font to SAP server chk this
    Re: Adding a new font for SAPscript/SMARTFORM output
    Regards
    Vasu

  • How to change the font size of text element in smartform

    Hi
    i want to know how to change the font size of text element in smartform
    regards
    Gincy

    Hi
    You can create Smartstyles, in which you can define paragraph formats for texts and character formats for character level changes.
    Paragraph format ---> alignment, font size etc
    character format for ---> superscript, subscript.
    After creating, in your smartform, there will be a option in the text element to enter a style.
    You give the created style and you can use the paragraph and character formats i that style.
    Hope this is clear..
    Regards
    Sekar

  • How to change the font used to fill in a text field.

    Can you please tell me how to change the font that comes up when a text field is filled in?
    Can I change this setting in InDesign or does it have to be done in Acrobat?

    It must be done in Acrobat. InDesign only allows Times Roman for some reason.
    To change it in Acrobat 11, open the PDF and select: Tools > Forms > Edit
    and select the field(s) you want to change, bring up the field properties dialog, and look on the Appearance tab for the font dropdown.

  • How to change the font size of the text that is revolving ?

    Hi there,
    I am using the Revolution theme.
    How to change the font size of the text that is revolving (on the first menu page) ?
    Thanks

    You can't.  That's hard coded into the theme.
    OT

  • How to change the font size of Text Box  Properties Appearance tab into 2 decimal digit.

    How to change the font size of Text Box  Properties Appearance tab into 2 decimal digit. I am uanble to modify it to 5.38 pt for example. Its only allowing to 1 decimal place.

    Click on each field and the choose Properties from either File menu (or if on Mac hold dow mouse button until context menu appears choose properties)
    go to Font
    choose desired size and type font,you can choose to make this the default.
    Do this with each field.
    Or if you have a lot of fields:
    while one is selected select all of them
    then go to fonts in properties
    change Font and size and make default.

Maybe you are looking for

  • How do I add a new mailbox on my iPhone?

    How do I add a new mailbox on my iPhone 4S. I have tried going to the "Mailboxes" and selecting edit but that just takes me to the "New Message" screen.

  • Using MacBook adapter w/ MacBook Pro & visa versa

    Hi, is there any risk in using a 60W adapter with a Pro? I have been told it will work but not charge the battery as fast. Howbout the other way- with an 85W on a MacBook? I don't like to do this sort of thing but then there is Ohm's Law.. And, for e

  • TS20000174 task  in Workflow WS20000079   not executed

    Hi , I Created cusom workflow by copying the standard Workflow WS20000079. While Creating the contract in transaction ME31k custom workflow will be triggered because event linkage using the business object bus2014 and event RELEASESTEPCREATED  has be

  • Pages not doing what it is supposed to do in exploder

    Help!!!!! I am using CS4 products I have already started with a bias I do not like explorer. The web page works fine in firefox but not exploder web page  aboutus.htm all the other pages work almost to how I want them. I must admit the whole site sta

  • Is it possi to use BBM over WiFi ??

    Hey guys, I recently purchased a bb curve 8520 and hav a data plan of my provider too ... I jus wantd to knw is it possi to use bbm wid wi-fi .. Or v cn nly use it wid d data plan ?? .. Coz my plan is about to get expired .. Pls help ..