ComboBox colour change

Hi all,
I've been looking for a way to change the colour of a JComboBox, but only in the editable area. To give you an ideea, this is akin to what certain web-browsers do when the user enters a wrong URL.
Anyways... as far I could find, it seemed that you need to write your own Editor (say, by extending BasicComboBoxEditor for example) for the ComboBox, where obviously you can change pretty much everything. This seems a painfully long and winded solution if I only want to perform a minor change and nothing more.
So basically, all that class-extending just for changing a colour can be compressed in a one-liner... allright - two, if you want to write code which is readable:
1 line:
<combo_box>.getEditor().getEditorComponent().setBackground(new Color(R,G,B));
2 lines:
Component box_editor = <combo_box>.getEditor().getEditorComponent();
box_editor.setBackground(new Color(R,G,B));
I'm not claiming that I've discovered something new here, it's merely a note, just in case anyone ever looks for a quick way of doing it. :)
<ducks the rotten tomatoes>
Ino!~

You can write a ListCellRenderer that renders the objects you add to the JComboBox however you like. Check that out in the API documentation or search the forums for ListCellRenderer, I'm sure you can find an example.

Similar Messages

  • TS1925 iPad IOS 7.0.2 and Mountain Lion 10.8.5 Calendar colors do not match between computer and device.  Problem did not exist until updated IOS arrived.  Colours change of their own free will despite being corrected on both iPAD and MacBook Pro.  Any an

    iPad IOS 7.0.2 and Mountain Lion 10.8.5 Calendar colors do not match between computer and device.  Problem did not exist until updated IOS arrived.  Colours change of their own free will despite being corrected on both iPAD and MacBook Pro.  Any answers?

    Please do not post the entire messages log as it takes up unnecessarily a lot of space.  It seems that there is a corrupt/nonfunctional file called
    [email protected]nt.plist
    Go to your hard drive, enter library, go into users, and go into launch agents and delete the thing above.  Empty the trash and restart.

  • On Mac. Colours changed after switching to 64bit mode (ver 2.7)

    Been using Lightroom 2.7 on my iMac quite happily and after reading a few articles realised it wasn't running in 64bit so changed it.
    Now colours are all out, most noticeable on reds:
    Before change
    After Change
    Any ideas why this is happening?
    Tried changing back to 32bit and still the same so something has changed.
    Thanks
    Andrew
    P.S Posted this on another forum and just to clarify here also, whilst the above are exported jpegs, these are used purely for illustration. The colour change is happening within lightroom itself, not on export.

    After some advice elsewhere it seems I have 'lost' some of the camera calibration profiles.
    I only have ACR3.1 and ACR4.4 listed and checked on another machine I used I normally have it set to Adobe Standard.
    So, how can I get the profiles back?
    OK. Problem solved. Reinstalled Lightroom.
    Usually fixes things

  • Can one choose the automatic colour change to an htnl link after using it to make it more obviously changed (currently two similar shades of blue)

    having performed a search and visited a paticular web page produced by that search, the colour of the link changes and if found again in another search you know it has already been visited.
    In many cases the change is from one shade of blue to another very similar shade of blue and it is very difficult to distinguish between them. An example would be at http://www.archive.org/advancedsearch.php?q=(parish%20registers).
    Can this colour change be edited to something much more easily recognised?

    I had the same issue and resolved it
    I first remove the prefs folder and the plist files for illustrator in ~/Libary
    next I logged off,
    then I uninstalled illustrator using the adobe uninstaller(http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html)
    Next I reinstall illstrator
    after that it worked for me.

  • Colour change in identically exported PDFs: InDesign CS5 to CS6

    Artwork turns out with a greener hue in a PDF Print document exported using InDesign CS6 trial software that has ruined a whole print run.
    This catalogue has been printed in past years using CS4 and CS5 software, each time the colours in the exported PDF proof, PDF Print file and InDesign files being accurate and matching perfectly.
    This time I used a trial of InDesign CS6 - Importing the same mother file as previous years and working on the document. When exporting the document however, despite using identical settings to export PDF files in the past, the exported PDFs turn out with a greener hue than the previous CS5 PDFs. I trialed a few different kinds of colour conversions in the PDF export window (i.e. 'no conversion' to 'convert to destination - RGB') just to see what happened -  and all turned out with the same result. The colour change is small but this was exxaggerated at print and as a result the colours
    looked drastically different from the catalogue the year before. Printing aside, (as it's a whole other ballgame), it came down to this slight PDF colour change.
    I'm wondering if anyone can help explain this - does CS6 handle colour exporting differently to CS5?

    Hi Eugene,
    Looking up the settings, they say the following:
    InDesign CS5: Unsynchronised "settings are not synchronised for consistent colour"  (odd; CS5 version is where the file exported with accurate colours)
    InDesign CS6: Synchronised "using the same colour settings for consistent colour management"   (CS6 version exported with a colour change)
    Another thing I've realised that might be an issue:
    The product images are still in RGB format (supplied by the photographer), where everything else in the artwork is in CMYK format. I've run a test export where I've converted everything to CMYK and exported it to a PDF.
    The results:
    InDesign CS5: Same colours consistently on both PDFs with RGB images and with all CMYK images.
    InDesign CS6: Green hue across PDF with RGB images in it, Correct colours in PDF with all CMYK images.
    So is this where the problem lies? The CS6 software having Synchronised colour settings shows a colour change when RGB photos are exported to PDF?
    Let me know your thoughts...

  • Why do colours change when converting from Word to PDF

    I am converting word files to pdf, however the header and footer background colours change once converted. How can I stop this happening?

    Depends on how you are creating the PDF. If you are using PDF Maker (the create PDF button), then check the preferences in that menu. There is an entry for the settings file selected. If you are printing to the Adobe PDF printer, the settings file is listed under the settings tab of the properties menu.

  • How can I animate colour changes of clips and mattes in fcpx

    Can Anyone help me in getting to grips with ficpx.
    I want to vary (animate) the colour of titles and mattes over their time periods. Also, i need to correct the variations of colour temperature (castes) which my panasonic camcorder produces sometimes. I notice that there is no animation icon in the inspector panel for colour changes and I am not able to insert animation points on the timeline animation strips above the assets. Any help would be appreciated. Lorenzo F.

    Color correction and color masks cannot be animated in FCP. You'd have to do this in Motion or some other app. DaVinci Resolve Lite is free.

  • Why the Colour changes in AI ???

    My friend had a PDF file created in AI. She gave me the PDF file only. I open the file with AI in order to do minor editing but when I copy this file and paste into a new AI document, the colour changes (it becomes darker) even both documents are in CMYK mode. (I am using Adobe Illustrator CC)
    The same file my friend gave me, I did the same with Adobe Illustrator CS5, there is no problem.
    Can anyone help? Thank you so much in advance.

    I understand that for an export operation, but still puzzled why the histograms are almost identical in LR for images that had been brought into PS from the same RAW file and converted to different spaces (with slight differences undoubtedly due to the different gamuts).   In that case, LR must be "honoring" the different color spaces, with the same appearance and histograms...  But when I soft-proof the same RAW file I get very different histograms -- the sRGB more stretched out than the ProPhoto one.  Those soft-proof histograms are "the same" (realizing they are all quick calculations) as when I do the corresponding convert to profile in PS.
    Maybe I'm not getting my head around "the histogram of the proof target."  That would be the more "dramatic" (changed) histogram I'm seeing in LR's soft proof and PS's convert to profile.  But is there a reason to show it that way?  Doesn't a histogram need to be interpreted in a color space to be meaningful?
    If I go ahead with something like a Save for Web or Export from LR in that target color space, I'll then see the histogram return to more or less what it was before (given that rendering intent has done its thing).
    Is it that the more dramatic histogram is simply representing the image in the wrong color space??  I can see that as a pragmatic decision.

  • Some colours change from Photoshop to Illustrator in Swatches saved in Exchange format

    When I save a colour swatch in Photoshop Extended CS3 in the .ase format and load it into Illustrator CS3, some of the colours change completely - e.g. a bright orange #ffbb29 (in Ps) appears as a pale grey blue #B2BACE (in Ai). The problem seems to be with the use of upper or lower case - if the orange is question is saved as #FFBB29, it appears correctly in Illustrator (although bizarrely this seems to only affect some colours that feature (hex) letters).
    Is there a way of getting Photoshop to automatically give the values in upper case? I know I could just retype them all, but it would take ages (I use Swatches all the time) and it kind of defeats the whole Exchange idea. Or is there another way round the problem? My colour settings are synched (via Bridge) across CS3 Design Premium. Thanks in advance.
    Running XP Pro SP3 (32 bit), Dual Intel 5160s, 4GB RAM (yeah, I know)

    Treza500 wrote:
    how can I import spot from PS to Illustrator
    Duotone/ Multichannel files (TIFF, PSD) where each channel is a spot color. Off the top of my head I'm not sure if JPEG even supports this, but it may.
    Mylenium

  • Apple Mail font  and colour changes while typing!

    I'm having an issue whereby the font and colour changes back to the default while I'm typing an email!
    I have several signatures.  When I select a signature and start typing, at apparently random moments, the font reverts to the default!
    This will happen when I'm typing a line and, when it changes, if I cmd-z to undo my typing character by character - at some random point it suddenly reverts back to the signature font and colour.
    Has anyone else experienced this, and is there a cause and/or solution?
    Thanks,
    Geoff

    I'm having an issue whereby the font and colour changes back to the default while I'm typing an email!
    I have several signatures.  When I select a signature and start typing, at apparently random moments, the font reverts to the default!
    This will happen when I'm typing a line and, when it changes, if I cmd-z to undo my typing character by character - at some random point it suddenly reverts back to the signature font and colour.
    Has anyone else experienced this, and is there a cause and/or solution?
    Thanks,
    Geoff

  • Colour changes when importing Illustrator graphics into Flash CS3

    Hi there!
    I'm creating a Flash site, and all the graphics are imported
    from Illustrator.
    Also, in the Illustrator file, there are some Phtoshop
    graphics with shadow effects on it.
    The problem is, that when I import the .ai into Flash, a
    pretty strong colour change occurs: everything becomes lighter. And
    the shadow, wich is black in Photoshop, turns white in Flash!
    Is there a way to solve this problem? I searched the net, and
    some people say it's an OSX thing, wich is pretty strange, because
    Mac is an obvious choice for loads of designers.
    I've attached an image preview.
    Preview
    Thanks in advance!
    Alex

    Thanks for the anwsers!
    However, the weird thing is, when I pick one of the photoshop
    graphics, asign the profile to it, and import it into Flash, the
    colors look fairly good. BUT when I import the complete Illustrator
    file with alle the graphics in it, I still get the color shift. I
    can now put all the graphics in the flash file, one at a time, but
    I think thats not the most easy way to do it..

  • Colour change problem

    I have a layered .psd file with a cream background ( FFFDEB ) but after I save to web the cream colour has slightly changed ( FFFDEC ). The difference can be seen on web pages with FFFDEB background. I have previously created images which have saved correctly, so it can be done.
    .psd file is 8bit, RGB image. Cinema HD display was set to Cinema HD profile....I have changed this to sRGB IEC61966-2.1 but it appears to have made no difference. PhotoShop color settings at Europe General Purpose 2 but I have tried North America General Purpose 2.
    Please can you help?

    The problem is PhotoShop and not web problem
    I am just trying to help you understand what may be going on there -- Photoshop is a colormanaged app that Converts to Monitor RGB.  Unmanaged apps on a Mac, including Dreamweaver, (for practical explanation) assume/apply/assign Monitor RGB which may explain the difference you are seeing.
    layered PhotoShop file with a cream background. When I save it as a
    jpeg the cream colour changes it's value from FFFDEB to FFFDEC. It's
    close but the difference can be seen when I import it onto a
    Dreamweaver page with FFFDEB background colour.
    I am pretty sure Dreamweaver doesn't honor profiles and convert to Monitor RGB so Dreamweaver is more likely assuming/assigning/applying Monitor RGB to your graphic and page background colors when it displays them on a Mac monitor (exactly as an unmanaged Mac web browser).
    This would be very easy to validate in Photoshop:
    1) Open your original .psd in Photoshop, flatten it, Convert to 8-bit sRGB
    2) Check the RGB values, then
    3) View> Proof SetUp> Monitor RGB should duplicate what Dreamweaver is showing.
    Bottom line is get your profiles in order and learn how the Mac OS and Photoshop deal with tagged and untagged color.
    Good luck.

  • Colour change in 2010 process??

    Why do colours change when I update the images in my catalogue to the 2010 process?? Has anyone else noticed this? On some images I'm also seeing a change in the image brightness itself.
    I'm attaching a screenshot for reference.

    I'm guessing you mean the amount of fill light applied for a certain value is different between the two versions??
    Yes and no. See below.
    If this is true, I don't get why this hasn't been documented anywhere.
    http://blogs.adobe.com/lightroomjournal/2010/03/lightroom_3_beta_2_now_availab.html
    The obvious risk I run of upgrading my catalogue to the new process is massive change in exposure and colour, which is scary and unacceptable.
    You don't have to. That's why the PV concept was introduced. You can keep the old images in PV2003 and convert on a per image basis, if you ever have to return to an old image. New images start from scratch with PV2010.

  • The colour changes depending on what file format you choose?!?

    So I have noticed that depending on what file format you choose the colour changes slightly. Why is this?
    For example I exported something in PDF and the colour changed yet when the PDF was printed it came out exactly how the colour should be. When I ex

    If you're working in CMYK, "softproof" your colors by choosing View->Overprint Preview. Note the keyboard shortcut
    If you're working in RGB, make sure the Creative Suite color management is synced. This is done through Bridge. May I suggest looking that up in Adobe Help.

  • Colour changed after layer merge or layer flatten

    Hi All,
    After making several adjustment layers, the layer merge is performed. However, it is observed that the colour changed after layer merging. It is confirmed with the histogram. This phenomenon also happens in layer flatten. Any solution?

    Not sure if this is related, but a previous post had color shift when he converted from RGB to any other profile and then back to RGB. Figured it was a rendering problem. Although he had latest video drivers he went back to previous one and solved the problem.
    By any chance did this start after a driver upgrade?

Maybe you are looking for

  • Passing username & password in HTTP Header

    Hi all, My 1st query. I want to access a url which asks for username & password. how can i put my username & password in the http header so that when i call that url it shouldn't ask for the username & password.can anyone plz show it as a piece of se

  • Unable to figure out the classnotfoundException

    Dear Members, I have an applet on which I want to show images. I have put .class and .html in the same directory and the images in the images directory. I'm usong Tomcat 5.5.4. Note: I have created certificates and also policy files for the applet. W

  • Storing on DVD

    If I download a bunch of TV shows from itunes, burn the files to a DVD and delete them from my computer to save space, and load them back to my computer when I want to watch that particular episode, should I run into any problems in terms of being ab

  • Re: Multiple address in local listener

    Can some one explains how scan listener works ? Edited by: rcc50886 on Sep 16, 2012 6:55 PM

  • Pop Us Mesage for Customer Texts

    Hi all, The requirement is as below, Customer wise want to maintain special instructions, to be flown sales order as a pop up message & at header text in S.O Then while creating delivery & billing the same pop up message should appear. For ex- the in