Changing tick colour on JSliders. any clues?

Hi there,
Is there a way to change the colour of the tick labels or colours on a JSlider?
Cheers,
Hugh

Sorry, I thought you were referring to just the basic JLabel. But wait a minute -- the slider labels are JLabels:
import java.awt.*;
import java.util.*;
import javax.swing.*;
public class SliderTest {
    public static void main(String[] args) {
        JSlider s = new JSlider();
        s.setMajorTickSpacing(10);
        s.setPaintTicks(true);
        s.setPaintLabels(true);
        Random rnd = new Random();
        Dictionary labs = s.getLabelTable();
        for (Enumeration keys = labs.keys(); keys.hasMoreElements(); ) {
            Color clr = new Color(rnd.nextInt(256), rnd.nextInt(256), rnd.nextInt(256));
            Object key = keys.nextElement();
            ((Component) labs.get(key)).setForeground(clr);
        JFrame f = new JFrame("SliderTest");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(s);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
}By the way, I have poked around in the source code for javax.swing.plaf.basic.basicSliderUI, like its
paintLabels method, and no joy -- there doesn't seem to be a UIManager key involved.

Similar Messages

  • TS1702 All of a sudden none of my apps that I installed will work.  I tap them and nothing starts.  Any clues?

    All of a sudden all the apps I have installed on my IPad won,t work.  They on the screen and when I tap them nothing happens.  All the apps automatically installed are still working.  I must have changed a setting somewhere.  Any clues?

    Try downloading any free app from the store (as that appears to reset something) and then re-try them - the free app can then be deleted.

  • Change the colour of any transaction

    Hi SAP Gurus,
        Can anybody help me......
        I need to change the colour of any transaction from default blue to black and white.
        I need this at transaction level, I can do this at user level (Customized local layout).
    Thanks & Regards,
    Krishna...

    Hi,
    I do not think so that it's possible. The SAP Gui is responsible for displaying data received from application server. Hence I think is completely based on the SAP Gui settings and you can't define layout per transaction in SAP Gui. Maybe it is possible to set up different layout for transaction in portal.
    Cheers

  • I would like to change the colour of bars in a chart without losing the underlying default texture associated with my chosen theme. None of the 3D textured fills offered in "Chart Colors" match the textured fill of the theme. Any suggestions?

    I would like to change the colour of bars in a chart without losing the underlying default texture associated with my chosen theme. None of the 3D textured fills offered in "Chart Colors" match the textured fill of the theme. Any suggestions?

    Thanks Gary, but no, that does not work. First of all, I can't select each bar individually. When I click on one bar, all three bars are selected.
    When I use "inspector > graphic" I have 5 fill options: none, color, gradient, image, tinted image. The default selection for the theme I'm using is image. What I would like to use for my charts is the same image that this theme uses for table headers. It has the same texture as the chart, but a different colour. Using anything but image or tinted image removes the texture from the fill.
    I have found I can do one of two things. I can select tinted image from the fill selections in "inspector > graphic" or I can select 2D Image Fills from "inspector > chart > chart colors". The first choice does not allow me to match the table header colour because it only allows me to apply a tint to the existing colour and adjust its opacity. The existing colour has too much influence on the fill, so I can't find an RGB adjustment that will match the table header colour. The image selections from "inspector > chart > chart colors" do not quite match the colour or the texture. Again, I can try to tint the image, but I still can't get it to match and the texture is not the same anyway.
    The image I want to use obviously exists in the software as it is an attribute of the theme, but for some reason is inaccessible. The other angle I have tried is to edit the theme, but I can't figure out how to do that either.

  • Is it possible to change the colour of the Pages' skin, since it is grey, is there any way to change it and make it less tedious?

    Is it possible to change the colour of the Pages' skin, since it is grey, is there any way to change it and make it less tedious?

    fruhulda wrote:
    If you see any grey"background" if is on the left and that is the comment field.
    Hi fruhulda
    It's not the comment field which is a restrictive description.
    In fact it's the window's background.
    Yvan KOENIG (VALLAURIS, France) lundi 26 septembre 2011 12:08:45
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • TS4051 This MacBook Pro (circa 2011) is the second Apple laptop with the same issue.  When I change sites (or at least many of them), the Mac issues a single chime.  I do not have any clue what this might be ... or if it even needs repairing if I can stan

    This MacBook Pro (circa 2011) is the second Apple laptop I have owned with the exact same issue.  When I change sites (or at least many of them), the Mac issues a single chime.  I do not have any clue what this might be ... or if it even needs repairing if I can stand the chime.
    If anyone has any ideas, I surely would love to hear!  Many thanks!
    Madelaine

    This is the Mac Pro (desktop workstation) forum.  You will probably get more meaningful results here:
    MacBook Pro: Notebooks: Apple Support Communities
    good luck

  • HT5312 Hello everyone, i need to change my rescue email address in order to retrieve the answers to my secret questions which I forgot. Any clues on how to do that? Thanks in advance

    Hello everyone, i need to change my rescue email address in order to retrieve the answers to my secret questions which I forgot. Any clues on how to do that? Thanks in advance

    If you can't remember your security questions go to  Express Lane , select iTunes from the list, then iTunes store.    On the next screen select account Management.    There, select iTunes store account security and write that you would like to reset your security questions and / or answers.
    You should get an eMail reply over the next 24 hours.

  • HT201364 since I updated my system to Mavericks my computer colour is always grey. I have tried to change the colour via system preference without any success. What should I do to so that my screen will be colourful?

    since I updated my system to Mavericks my computer colour is always grey. I have tried to change the colour via system preference without any success. What should I do to so that my screen will be colourful?

    Please post a screenshot that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Drag the image file into the editing window to upload it. You can also include text in the reply.

  • Hi, I changed my google id and ical crashes before i can get into preferences and change the account. I tried keychain deletions but not helping. any clues?

    Hi, I changed my google id and ical crashes before i can get into preferences and change the account. I tried keychain deletions but not helping. any clues?

    Hi, I changed my google id and ical crashes before i can get into preferences and change the account. I tried keychain deletions but not helping. any clues?

  • HT1918 So I changed my email address and got an error "invalid year" Any clues?

    So I changed my email address and got an error "invalid year" Any clues?

    Hi Stapleton2137,
    This sounds like an issue with your security settings for your Apple ID.
    If you are having issues with your Apple ID, the two articles below will help:
    Frequently asked questions about Apple ID
    Apple - Support - Apple ID - Manage Account
    Cheers,
    Judy

  • HT1212 ive changed my email on itunes and apple and att but my app store still shows my old id so it doesnt recognize me to add new apps...any clues how to get it changed on the phone

    ive changed my email on itunes and apple and att but my app store still shows my old id so it doesnt recognize me to add new apps...any clues how to get it changed on the phone

    Firstly, you need to change your details with Apple,  Start here, change your country if necessary and go to manage your account. You may have already done this.
    In order to change your Apple ID or password for your iCloud account on your iOS device, you need to delete the account from your iOS device first, then add it back using your updated details. (Settings > iCloud, scroll down and hit "Delete Account")
    Providing you are simply updating your existing details and not changing to another account, when you delete your account, all the data that is synced with iCloud will also be deleted from the device (but not from iCloud), but will be synced back to your device when you login again.
    In order to change your Apple ID or password for your iCloud account on your computer, you need to sign out of the account from your computer first, then sign back in using your updated details. (System Preferences > iCloud, click the sign out button)
    In order to change your Apple ID or password for your iTunes account on your iOS device, you need to sign out from your iOS device first, then sign back in using your updated details. (Settings > iTunes & App store, scroll down and tap your ID)
    If you are using iMessages or FaceTime, you will also need to log out and into your ID there too.

  • Change the colour of the outer line of a circle

    Hello everyone,
    I drew up a circle with no fill inside, to show where the location of my highway storm culvert will be.
    I changed the thickness of the outer line of my circle shape by creating a stroke effect at layer → blending options → stroke; then I changed the thickness of the line by right clicking in stroke at the layers panel and then choosing "scale effect."
    But the problem I have is that the outer line is gray, and I want it to be black.
    The outer line was originally red though so I changed my image → mode to grayscale, because I couldn't find a way to change the colour while keeping my image in RGB colour.  So I've managed to make the outer line gray by changing the image mode but I still can't change the colour of the outer line to black.
    I'm sure there must be other ways of changing the outer line colour without having to change the image mode, but I'm clueless.
    Here is my drawing:
    The text next to the circle says «Obra de desagüe». That's spanish for "drainage construction site."
    You see, I can't change the colour because I have no clue at where the "change colour option" is. I tried going to layer → layer properties, but in there there's only 7 colours to choose from. I chose a random colour, just to see what happens and what truly changed colour was the layer, within the layers panel; not the shape contained within the layer.
    So I'm lost here, any help please?
    Unfortunately I'm still not an expert in Photoshop just yet.
    Thank you for reading my post.

    Set shape layer opacity 100% Fill 0% to make fill transparent or add an empty layer make a circular selection stroke it black.

  • In the old Numbers I could change the colour of a checkbox using rules - I cannot seem to do this in new Numbers 2013?

    In the old Numbers I could change the colour of a checkbox using rules - I cannot seem to do this in new Numbers 2013?
    I have an old Numbers sheet where I could make the checkbox Cell go Green when ticking "Equal to" TRUE. When I open the old sheet it into new iWork it functions correctly. But I am unable to copy or paste the rule - nor recreate it.
    Any suggestions on how to create a Conditional checkbox cell that goes green once ticked would be most apprecicated.
    Thanks - Steve

    Numbers 3.0 is missing the logic-based "equal to TRUE" or "equal to FALSE" conditions for conditional formatting.  The replacement is text based: "text is TRUE" or "text is FALSE".  You can apply these rules to cells formatted as checkboxes.

  • Smart Playlist does not play new songs.  Any clue?

    I created a Smart Playlist that referes to another Smart Playlist.  This other playlist selects randomly songs that were last played before a certain date.  (So if a song from that playlist is played, it is automatically replaced by another one).  The newly added songs do not seem to be played at all.  I need to restart iTunes to do so.  Any clue?

    In principal, putting a Smart Playlist into another Smart Playlist will work. However, if the rules of the Playlists are conflicting, that may be why you have an issue. First of all, can we be clear on exactly which Playlists are doing what?
    Are you saying that songs recently added to your iTunes Library are:
    not in the first Playlist,
    not in the second Playlist but are in the first one, or
    that they are in the second list, but simply don't play.
    or that songs, newly added to the second Playlist are there, but don't get played? In this case, how many songs are in the list?
    Can you take screenshots of the two playlists, or list them here. In this screenshot for example;
    ...this Playtlist refers to five other Smart Playlists. The resulting Playlist is usually over 300 songs. So I don't always know if a song in the list ever gets played, simply because there are so many. I do know however, that the list plays a random selection of my songs and gets updated successfully when I sync the iPod with iTunes.
    If you list the Playlists here (rather than screenshot them), can you also mention the top left tick-box section; "match any/all of the following rules". It changes according to the fields below it.

  • How to make this image compatible as a laser cut file by changing stroke colour?

    My final aim with this image is to make it compatible as a laser cut raster engrave design, so the laser cutter will fill the black areas or white (either would be fine). If this is not possible then even as a laser cut outline would be suitable
    This is how the image will look when in Illustrator. however when I use the preview screen (ctrl+y) it creates an outline. This is how the laser cutter will read the image which is why it is very important the preview image is is what i would expect the final outcome to be.
    As a raster the laser cutter requires the stroke line to be blue r:0 g:0 B:255. Currently I cannot edit the colour, yet I can change the stroke weight. Also how I would I fill the engraved areas as a stroke? At the moment when I try converting the stroke to blue it turns grey.
    I am also unsure as to how I would make this feasible even to be cut out when I cannot change the stroke colour to red. This is required for laser cut designs as the laser cutter reads red lines to be cut.
    I can usually change stroke colours easily so I assume this is due to the fact that I have brought this file through from Photoshop so it is not yet fullu editable. I have used the live trace and live paint function in illustrator so far.
    Any help would be appreciated

    You need to expand the artwork and convert the strokes to genuine outlines to in turn be able to apply anotehr thin stroke to them again...
    Mylenium

Maybe you are looking for