How to add defferently Font to the JComboBox .

I want add a JComboBox in my applet,and want every items of the JComboBox hava differently color and font,what i can do it.could u like to give me some example code .help!thank u!

Hi,
I think you can use java's powerful way of renderring html...
here is one example that can help you....
import javax.swing.*;
import java.awt.*;
public class MyCombo extends JFrame {
     public MyCombo() {
          getContentPane().setLayout(new FlowLayout());
          setSize(200,200);
          JComboBox aJComboBox = new JComboBox();
          aJComboBox.addItem("<html><font color=red>1</font></html>");
          aJComboBox.addItem("<html><font color=blue>2</font></html>");
          getContentPane().add(aJComboBox);
          setVisible(true);
     public static void main(String argv[]) {
          MyCombo aMyCombo = new MyCombo();
Hope it will help u...
Kind Regards
Chetan Chandarana

Similar Messages

  • How do I add Show Fonts in the upper left corner of the viewer in iMovie if it is not there

    How do I add Show fonts in the upper left corner of the viewer if they do not exist?

    Hi
    You must have a Text inserted one way or the other.
    then click on the Text clip box
    and now it's there.
    You have Advance tools turned on ?
    Yours Bengt W

  • How to add coustom fonts in Adobe formscental ?

    Hi,
    I want to add coustom fonts in my form, which i have created in adobe formscentral. But here is limited fonts.
    So how i add different fonts in this software ? (because different client want add there own fonts in there forms).
    Regards,
    Susanta

    Sorry we only support the fonts in the font family dropdown. You can't use your custom fonts. You can create or vote for the idea here : http://forums.adobe.com/community/formscentral?view=idea
    Gen

  • How is it that fonts in the Mac system can be damaged?

    How is it that fonts in the Mac system can be damaged?
    It does not hapen in PC systems, ever!
    How do we go about replacing the damaged fonts?
    I treid to delete and reinstall but no sucess.
    Also, Mac systems can only have active about 250 fonts.
    PC systems can have up to 1,000 fonts and run very smoothly with any hitches.
    Any sloutions or recommendations?
    Looks like I made a wrong choice.
    I thought that Mac systems was very stable when it comes to graphic related applications, but it seems that I was WRONG.
    A simple font base also Mac system cannot handle as well as a PC based system.
    Sorry if I have offended other Mac users.
    But, I would really like to continue using my Macbook Pro.
    Cheers and Merry Christmas, everyone!!!
    Kelvin LEEmy

    How is it that fonts in the Mac system can be damaged?
    As ds store noted. Any file on any part of the drive can be damaged at any time. This is true of any OS, not just the Mac.
    It does not happen in PC systems, ever!
    Why in the world would you think that's true? I used DOS/Windows for years. Fonts on PCs get damaged too, for pretty much the same reasons.
    How do we go about replacing the damaged fonts?
    You can replace just the fonts from your Snow Leopard installation disk. See the bottom of my article, Font Management in OS X for instructions.
    I tried to delete and reinstall but no success.
    Not enough info. Reinstalled from where?
    Also, Mac systems can only have active about 250 fonts.
    I don't know where you read or heard that, but it's 100% wrong.
    PC systems can have up to 1,000 fonts and run very smoothly with any hitches.
    And I've had as many as 8500 active (for testing, I would never do it day to day). Do I win?
    Any solutions or recommendations?
    The most likely reason, assuming you replaced the fonts with known good copies is Font Book. Put bluntly, it's one of the worst font managers available. It's database is easily corrupted. When that happens, fonts that are marked as active in its interface won't appear in some, or all apps. You'll find you can't activate or deactivate fonts. Use these steps to clean Font Book up so it works.
    Restart your Mac and immediately hold down the Shift key when you hear the startup chime to boot into Safe Mode. Keep holding the Shift key until you see a progress bar towards the bottom of the screen. You can let go of the Shift key at that point.
    OS X asks you to log in (you will get this screen on a Safe Mode boot even if your Mac is set to automatically log in). Let the Mac finish booting to the desktop and then restart normally. This will clear Font Book's database and the cache files of the user account you logged into in Safe Mode.
    After the Mac finishes booting back to the desktop from Safe Mode, do the following to clear the rest of the font cache files.
    Close all running applications. From an administrator account, open the Terminal app and enter the following command. You can also copy/paste it from here into the Terminal window:
    sudo atsutil databases -remove
    Terminal will then ask for your admin password. As you type, it will not show anything, so be sure to enter it correctly.
    This removes all font cache files. Both for the system and the current user font cache files. After running the command, close Terminal and immediately restart your Mac.
    Looks like I made a wrong choice.
    As opposed to what? Dealing with viruses each and every day?
    I thought that Mac systems was very stable when it comes to graphic related applications, but it seems that I was WRONG.
    Boy, you sure know how to make people want to help you.
    A simple font base also Mac system cannot handle as well as a PC based system.
    Also flat out wrong. Fonts are simple. You add them and use them. Turn them off when you don't want them active. Learning and understanding a new OS is usually a good idea before you start trashing it.
    If problems return soon after resetting Font Book with the notes above, then you most likely installed junk fonts. Free fonts are worth what you paid for them and are the number one source of such problems on both Macs and PCs.
    Secondly, get rid of Font Book. If you use and manage fonts every day, get a professional manager. Suitcase Fusion 4 and FontExplorerX Pro are your best choices.
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • How to Add Missing Fonts

    Hello!
    I read through a bunch of other posts but haven't been able to fix my problem. I use Pages to design a project that I turn in each Friday. Today I opened last week's Pages file to update my project for this week and it says:
    "The following errors occurred while trying to open this document:
    Missing Font -- Hoefler Text-Regular
    Missing Font -- Baskerville"
    Etc. Lots of missing fonts.
    It tells me "To include missing fonts, add them to your Fonts folder, then quit and reopen Pages."
    I have no idea how to add a font to my fonts folder or even where my fonts folder is. And where do I get the font? I am so confused! Somebody please help me!
    Thanks!

    Welcome to Apple Discussions, mowriter.
    Open FontBook from the Applications folder and check the font collections "All Fonts" and "User".
    Hoefler Text, e.g. is found in my "All Fonts" collection and it even contains duplicates from Mac OS 9 system folder (marked with a black dot).
    Maybe you've just disabled the fonts that Pages requests.
    If this information is useful to you, please mark it as "helpful" or "solved" using the little buttons in the titlebar of my message. Thank you.
    PowerBook G4 17", 1GB   Mac OS X (10.4.8)   iMac G5 20"; iPod 3G, iPod Shuffle, iSight

  • How to add a page in the SAP Scripts

    Hi All,
    I want to know how to add a page in the sap scripts. there is already sap script developed by some other person.
    Now I have to add a page in front of that and have to add some more data.I added a page in page windows but thats not at all working.
    Please help me out in this.
    Thanks,
    Praveen

    new page will create in sap scripts using new page command.
    you have to set condition like after some number of records displayed in page new page has to be trigger.
    ex:YOU HAVE SO MANY RECORDS FOR PRINTING BUT YOU WANT TO DISPLAY 100 RECORDS IN FIRST PAGE REMAINING IN SECOND PAGE LIKE THAT.
    Here you can use NEW PAGE COMMAND .
    IT IS OPPOSITE PURPOSE OF PROTECT AND ENDPOTECT.
    Reward if useful.

  • How to add log messages in the sever/webui objects?

    Hi,
    I am new to the OA Framework.
    Can any one share any information in how to add log messages in the sever/webui objects?
    What are the beans I need to use to show in the diagnostic page?
    Can I get sample code for this log staments?
    Thanks in advance,
    Padma

    Hello. This forum is for reporting problems with the published Oracle documentation. You have a better change of getting a reply if you post your question on the Database - General forum.
    Regards,
    Diana

  • How to add an item into the Newsstand

    How to add an item into the Newsstand.  Please do NOT reply using  "tech-language." Use standard- normal everyday English. Thanks,
    Don Otlin
    Franklin Square, NY

    Open Newsstand. Tap on the "Store" button in the upper right. Any newspaper or magazine you download from the store will appear in Newsstand.

  • CRM  IC Winclient - How to add new fields in the BP Search of TRX CIC0

    Hello Experts,
    I want to know how to add new fields in the BP Search of TRX CIC0. In the HTML that we're using here I need to add the URL of the BP.
    Can you help me?
    Thanks in advance.
    Caíque Escaler

    Hi
    make append to tables in se11 - CCMBP1FIELDS, CCMBP2FIELDS
    in spro in Define customer-specific search control -> mark fields with X.
    and enhance html template CRM_CIC_SEARCH_DISPLAY. -> tcode smw0, look for package CRM_CIC_COMPONENTS for html CRM_CIC_SEARCH_DISPLAY. export it from SAP, edit, and import.
    you will need to enhance function module used for searching - you will find him in spro in Search Strategies.
    Regards
    Radek

  • How to add new fields to the system form (Ex.expenses to a/r invoice form)

    hi
    can any one tell me how to add new fields to the system form (Ex.expenses to a/r invoice form)
    i want to add expenses field to system a/r invoice form and connect data base also.
    i used the code of samples\11.system form manipulation(vb.net) but i'm not able to get it....so can any one help with code or concepts.
    reply soon plz..
    thankQ

    If I understood you correctly, you are just trying to add new fields to the invoice form and then use them in your form. you should first go and add the field to your tables, which you would do by going to Tool --> User Defined Fields --> Manage User Fields. There are different documents or categories given. For ex. for invoices, Sales Orders you would add your field under the Marketing Documents. If you want the field to be just one per invoice, add it to the Title, otherwise if you want a field per invoice or Sales Order line, add it to the Rows section. Once you have done that then you can just create a edit box or drop down to represent the field and set the datasource for that to your field. If you want example code to do that, let me know.

  • How to add new fields to the DME file in F110

    Hi,
    We have a requirement add new fields to the file that is used in  F110.
    .I did go in to DMEE transaction but I hae no idea how to add new fileds to the existing file.
    Can anybody please help me in resolving the issue.
    Thanks
    Venkat
    Edited by: Venkat R on Jun 8, 2009 8:45 AM

    Hi,
    There is no function module for that, We have created our own function module and attached to that field.
    Refer the below code. This will fetch the document number.
    DATA: lwa_item   TYPE dmee_paym_if_type,
            l_fpayp   TYPE fpayp,
            l_fpayhx TYPE fpayhx,
            first_flag TYPE c,
            lv_lifnr   TYPE lifnr,
            voucher_id TYPE string,
            voucher TYPE string,
            invoice_id TYPE belnr_d,
            voucher_len1 TYPE i,
            voucher_len TYPE i.
      TYPES:
      BEGIN OF lt_regup,
            xblnr TYPE xblnr1,
            belnr TYPE belnr_d,
      END OF lt_regup.
      DATA: lt_regup TYPE STANDARD TABLE OF regup,
            lv_regup TYPE regup.
    Hope this helps.
    Raja.A
    Edited by: Raja.A on Feb 16, 2011 7:17 PM

  • How to add new fields in the EBP front end..

    Hi All,
    Can any one let me know the process of how to add new fileds in the shopping cart creation screens by using the "Tag Browser" option in the Object navigator.
    Best Regards,
    Mahesh. J

    Hi
    <b>Please go through the following links for more details and examples -></b>
    http://help.sap.com/saphelp_47x200/helpdata/en/a2/8c6eeb2d8911d596a000a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/d3/5ecbe22a8a11d5991f00508b6b8b11/frameset.htm
    This will definitely help.
    <u>For adding customer fields to the Shopping cart, you need to refer SAP OSS Bote 672960 and 485891.</u>
    Do let me know, incase you need any other details.
    Regards
    - Atul

  • How to Add multiple entry to the group policy security filtering

    How to Add multiple entry to the group policy security filtering
    Is there any way we can add multiple entry to the Domain group policy Security filtering tab.Currently its not allowing to add more then one entry at a time.
    Getting Error like "only one name can be entered,and the name cannot contain a semicolon.Enter a valid name"

    Hi
    Are you trying to add more users or groups through Group Policy Management Security Filtering tab?
    Try right clicking on the policy and then edit
    Then in Editor Right click on the name of the policy and Properties
    Security tab and add user or group from this tab. Just make sure if you are adding user or groups "Select this object type" has
    the correct option also "From this Location" is set to your entire directory not the local server.
    Update us with the above.
    Thanks

  • How do I change font in the whole document at the same time?

    How do I change font in the whole document at the same time?

    Menu > View > Show Styles Drawer
    Menu > Help > Pages User Guide
    Download and read page 27 on creating and using Styles, which is done largely by example ie you make the text what you want then save it as a Style to be applied wherever you want in the document from the Styles Drawer.
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=180&mforum=iworktips ntrick
    Peter

  • How to add one column to the standard t.code : CAT2.

    Hi,
    How to add one column to the standard t.code : CAT2.
    thanks

    Hi Chinna
    see the  enhancements by using SMOD <b>CATS0007</b> , or <b>CATS0012</b> and create a project using CMOD and you can implement your requirement.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

Maybe you are looking for

  • Windows recognizes iPod but it doesn&#146;t charge

    Hi, can anyone help me? When I connect the iPod the PC recognizes it and starts to synchronize with iTunes, but the charging icon appears full with a lighting bolt and it is not animated. After a while the when the battery is low, the iPod turns off

  • The Home folder is still in the name of the previous owner.

    Hello. I have recently purchased a second hand iMac.The Home folder is still in the name of the previous owner and I keep getting asked for his passwords. All his applications are still on there, so I would like to do a clean install and start again.

  • I can't get my ipod to work at all

    I bought my husband a nano yesterday and when we try to plug it into the computer all it does is say do not disconnect and the ipod does not show up on itunes and if we just unplug it goes straight into factory settings We already have a ipod 60g so

  • SAVE of a Purchase Order

    Hi, How to create a additional line items for a PO, when it is not created by the user for a single entry? Thanks ginni

  • Flash Crashing in Chrome

    I have installed latest version of Flash Player ie., 11.5.502.110 on my windows xp and windows 7 operating  system. when I am trying to open a Webpage with Flash content  in Google Chrome version 23 an error message appears  saying " Shockwave Flash