Can I change the back/foreground color of a disabled JComboBox?

I need to change the color of the text or the background for a disabled JComboBox. My users would like to be able to see the data better even though they can't alter it.

I see i have to create a ComboBoxUI, but have no idea how to start a simple one.Then start with an existing one.
a) look at the source code for BasicComboBoxUI
b) find the occurences of 'disabledBackground' and 'disabledForeground' to give you an idea of where to make your changes and then override those methods
Thats the easy part. If you run this [url http://www.discoverteenergy.com/files/ShowUIDefaults.java]program you will notice that the Metal LAF uses the      javax.swing.plaf.metal.MetalComboBoxUI class and the Windows LAF uses the com.sun.java.swing.plaf.windows.WindowsComboBoxUI class. So if you need to support both LAFs then you would need to override both classes and tell the LAF Manager which class to use. I don't know how to do this.

Similar Messages

  • Can you change the back piece color?

    I been patiently waiting for this phone to come out for T-Mobile. But I noticed that the back was gray.. Which I don't like how it looks at all. I was wondering if I can take that piece off and buy a black one or something. If I can, does anybody know the price? Thanks.

    I am not sure IF you can now, but you will be able to eventually as different carriers introduce variations and parts become available.
    Check with Horizon in my sig below... they have parts.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Can i change the back Color from the IPhone 5c

    Can i Chang the back Color from the i-Phone 5c .Now i Heven Pink and i want Blue Shoud i go to a Apple störe to do that and how much does it cost!!!

    Apple does not do this at all.
    Not sure if anyone does this.  if they do, it will void the warranty

  • How can I change the font and color of an email signature?

    How can i change the font and color of an email signature?

    Mail > Preferences > Signature
    Highlight the Signature.
    Click Format in the menu bar and select " Show Fonts".
    Select the Font.
    Highlight the Text.
    Click Format in the menu bar and select " Show Colors".
    Select the color.
    Mail > Preferences > Composing > Message Format:  Rich Text
    Best.

  • How can i change the font and color in mail 5?

    how can i change the font and color in mail 5?

    Mail -> Preferences -> Fonts & Colors
    If you want to change the font and color in a message you're composing, you can right-click on the message and use the Font/Show Fonts command to bring up the Font panel (among other ways).
    Regards.

  • Can i change the preview background color?

    Hi
    can i change the preview background color?
    it's gray , may i change it?
    thanks
    i use bridge cs6

    can i change the preview background color?
    Yes you can do so in the Bridge preferences under general both Ui interface and image backdrop can be changed
    In the same preferences Cache you can change the location of the central cache to where ever you will. But you have to realize that if you use an external disk this can cause all kinds of problems regarding speed, performance and permission issues. best to keep it on an internal disk and having an SSD available will be even better because you will benefit from performance and speed very much.
    it's gray , may i change it?
    As long as you have a legal version and it is able to change then feel free to set it to your own custom wishes...

  • How can I change the status bar color on Lollipop?

     How can I change the status bar color on Loppipop?I can not find the any menu about this...Now I use the theme creator 0.0.3 BETA.

    Hi, Theme creator 0.0.3 is still not compatible for complete Lollipop features, the next update of theme creator should fix this. I am waiting for this too... Regards,Shreyas.

  • How can I change the default text color (black to blue) in Mail on Mountain Lion

    How can I change the default text color (black to blue) in Mail on out going email with Mountain Lion

    There really aren't default outgoing font settings. They are only there for viewing. A workaround I have seen mentioned is to start you signature with the font style you want to use. When you start your message, click in that first part of your signature.
    Something like
    defaults
    Signature

  • How can I change the default blue colors of Planning web forms?

    Hi,
    how can I change the default blue colors of Planning web forms and the Logon screen colors?
    thanks

    That PDF file mentioned updating file HspCustomImgs_en.template in D:\Hyperion\deployments\WebLogic9\servers\HyperionPlanning\webapps\HyperionPlanning\custom folder:
    But for what I needed to do, here's another undocumented file to change color in right side menu: Update global.css file
    in D:\Hyperion\deployments\WebLogic9\servers\HyperionPlanning\webapps\ HyperionPlanning\ui_themes\tadpole

  • How can i change the particular node color in Jtree?

    I have constructed the tree.i dont know how to set the color for the particular node then how can i change the particular node icon depends on some conditions like if we will give the input whether it is available in jtree that node icon only changed.Anyone please help me as soon as possible.

    hi,
    i saw that tutorial.from that book i dont get the particular node cell renderer.i got a cell renderer for tree only.i attached my code in this mail.pls see and help me if u will do
    mport pack.Prop;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Font;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Properties;
    import java.util.Set;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.text.Position;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreePath;
    public class ReadProperty3 extends JFrame{
    String str,key;
    static JTree tree;
    static Vector v;
    StringTokenizer st;
    static DefaultMutableTreeNode root;
    DefaultMutableTreeNode t;     
    public Object[] o;
    public static void main(String[] args) throws IOException {
    ReadProperty3 r = new ReadProperty3();
    Prop p=new Prop();
    JFrame f=new JFrame();
    p.show();
    Object[] o=v.toArray();
    int startRow = 0;
    String prefix =p.s;
    TreePath path = tree.getNextMatch(prefix, startRow, Position.Bias.Forward);
    //if(prefix.equals(root.getChildAt(0).toString()))
    if(prefix.equals("2000"))
         System.out.println("Node 2000 found");
         else if(prefix.equals("3000"))
              System.out.println("Node 3000 found");
         else if(prefix.equals("4000"))
              System.out.println("Node 4000 found");
         else
              System.out.println("Node not found");
         for(int i=0;i<v.size();i++)
              //((DefaultTreeModel)tree.getModel()).reload();
              DefaultTreeCellRenderer ren=(DefaultTreeCellRenderer)tree.getCellRenderer();
              Icon openIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon closedIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon leafIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/read.gif");
              if(o[0].equals(p.s))
                   ren.setBackgroundSelectionColor(Color.MAGENTA);
                   ren.setBackgroundNonSelectionColor(Color.YELLOW);
                   //ren.setTextSelectionColor(Color.YELLOW);
                   //ren.setTextNonSelectionColor(Color.BLUE);
                   ren.setClosedIcon(closedIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,14));
              else if(o[1].equals(p.s))
                   ren.setLeafIcon(leafIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,10));
                   UIManager.put("Tree.leafIcon", leafIcon);
              else if(o[2].equals(p.s))
                   ren.setOpenIcon(openIcon);
                   ren.setFont(new Font("Dialog",Font.BOLD,9));
    public ReadProperty3(){
         super("JTree With Properties");
         try{
    int c = 0;
    while(c == 0){
    c = 1;
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter file name which has properties extension :");
    str = bf.readLine();
    File f = new File(str + ".properties");
    if(f.exists()){
    Properties pro = new Properties();
    FileInputStream in = new FileInputStream(f);
    pro.load(in);
    System.out.println("Key: " + pro.keySet());
    System.out.print("Enter Key : ");
    key = bf.readLine();
    String p = pro.getProperty(key);
    st = new StringTokenizer(p,"=,");
    root=new DefaultMutableTreeNode(key);
    v=new Vector();
    while(st.hasMoreTokens())
         String val=st.nextToken();
         v.add(val);
         o=v.toArray();
         System.out.println(val);
         t=new DefaultMutableTreeNode(val);
         root.add(t);
         tree=new JTree(root);
         tree.setEditable(true);
         JScrollPane jp=new JScrollPane(tree);
         // tree.setCellRenderer(new CellRenderer());
         Container content=getContentPane();
         content.add(jp,BorderLayout.CENTER);
    setSize(250,275);
    setVisible(true);
    addWindowListener(new ExitListener());
    else{
    c = 0;
    System.out.println("File not found!");
    catch(IOException e){
    System.out.println(e.getMessage());
    }

  • How can i change the blue backgroung color ?

    The top of the Firefox page is a light blue color.
    How can I change it to another color ?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Can I change the background/skins color?

    Hi folks
    Is there any way to change the dark grey color of the program background?  My aging eyesight finds it hard to see the controls.
    Regards
    Roy

    Hi Roy
    Ignore feature requests. Write to the CEO of Adobe demanding international accessibility.
    At present the UI sucks.

  • Export to Web: Framed, can you change the frame size/color?

    I like the new back forth arrows with the framed feature but would like a smaller frame and maybe black. Is there an option for this?
    I can also change it in dreamweaver if someone has a hint on that.
    I wish the same front back arrows were on the non framed exports.

    If you know HTML you can take some of the controls of the framed version and apply them to the plain version. As far as the frames, they are created by individual files for each side. You would have to modify each frame component in the Resources folder that is created along with the html files.
    ADDENDUM:
    Have you considered using iWeb to create a photo page? With iWeb you have the option of nearly 80 different frame types as well as any color background.
    The standard IWeb has only 24 frames for applying to photos. This application changes the preferences file for iWeb to make available nearly 80 additional frames: Frames and strokes installer for :iWork ’08, iWork ’09, iWeb ’08 et iWeb ’09.
    Click to view full size
    Be sure to keep the install package as upgrades to iWeb, Pages or Keynote, and possibly updaters, will remove them and you'll have to reapply it go get them back..
    OT
    Message was edited by: Old Toad

  • How can I change the back camera resolution?

    Hi, I want to change the actual pics size from my iPhone 5s' back camera (3264x2448) to 1920x1080.  How can I do that?
    Thanks!
    Andres N.

    Mc Apple wrote:
    When I turn on Time Machine it says "next back up: 1:10pm" but I don't see any options to change that or to back up now. How can I back up whenever I need to with out waiting for the next scheduled back up?
    There are a few 3rd party apps to change the TM scheduler. I have never used any but here's a few:
    http://timesoftware.free.fr/timemachineeditor/
    http://www.klieme.com/TimeMachineScheduler.html
    As noted, I cannot vouch for them, but an internet search will no doubt turn up even more.

  • CAN I CHANGE THE BACK COVER OF IPHONE 5

    I have a small scratch(hollow) near the on/off button of my black iphone 5. Can I change /buy a new back cover from Apple ?

    It is possible to change the casing of the phone.  However, it is not available for purchase.  I would recommend buying a light case to cover and protect the back of your phone.

Maybe you are looking for

  • Can I add a second 6-Core: 3.33GHz Intel Xeon "Westmere" processor later?

    Can I add a second 6-Core: 3.33GHz Intel Xeon "Westmere" processor later if I purchase a MacPro 2010 with a single Can I add a second 6-Core: 3.33GHz Intel Xeon "Westmere" processor? Why is the build to order 12 core processor limited to 2.66 GHz Int

  • Information about table spaces.

    Hi! I have a requirement to   create a Bex by which I can display the  list of table spaces available and status of  those  table spaces like memory free, Used. Though we can get this information from  DB02  I need to generate a  report and  broadcas

  • Need clarification on SATA and PC3200

    First of all thanks to all who replied to my first question, I robbed a 3.5 drive out of an old computer and will use it to load driver then remove it.  Or I may copy those drivers to cd and see what happens. Is it possible to do this and not have to

  • Define Measurement Method as Default in Progress Analysis

    Hi All, I have defined Measurement Method 0000000003(Milestone) in progress analysis for my company code. But while running CNE1 for my project it is not picking the measurement method i have defined for my company code but it is picking the 0-100 Me

  • How to start iTunes in XP? "safe mode" produces: "A rental is being transferred..."

    iTunes does not become visible.  Task Manager shows it has started (in Processes).  Trying "safe Mode" only comes up with the message: "A rental is being transferred. If you quit now, the transfer will be cancelled. Are you sure you want to quit?" an