JScrollPane - setting colors of scrollbar arrows

I have vertical and horizontal JScrollPane's. To set the color of the arrows for the vertical JScrollPane, the following (suggested by ldafinca in thread 125581) works fine.
scrollPane.getVerticalScrollBar().getComponent(0).setBackground(new Color(...));
scrollPane.getVerticalScrollBar().getComponent(1).setBackground(new Color(...));
however, the same is not true for the horizontal JScrollPane. The following does not work (ie. changing getVertical... to getHorizontal...)
scrollPane.getHorizontalScrollBar().getComponent(0).setBackground(new Color(...));
scrollPane.getHorizontalScrollBar().getComponent(1).setBackground(new Color(...));
Is there an equivalent for horizontal JScrollPane ?

I submitted this qusetion and I am retracting it. the code supplied above for horizontal JScrollPane DOES work. I have 2 different horizontal JScrollPane's and the simple one does work. The source of my problem must be something else that I am doing in my code.
Sorry for wasting people's time.

Similar Messages

  • Change color on scrollbar

    Hi.
    Is there any way to change the color on the scrollbar.
    I have tried with some css, but looks like the css editor dosent recognize my attributes.
    eks. scrollbarBaseColor="back";
    thanks in advance

    Hi,
    If you want your app's browser's scrollbar to be changed, then in your resources/stylesheet.css you would add e.g.
    body {
    scrollbar-base-color: blue;
    scrollbar-arrow-color: blue;
    . {and all the other scrollbar related props..}
    /krys
    CreatorTeam

  • Could set background color of scrollbar?

    Hy
    is it possibile set background color of scrollbar?
    thanks

    From my experience on this - yes, setting the colour (or the Visual Attribute) of the Block object will determine the background colour of the scrollbar. As far as I can see, it doesn't affect anything else.
    I've had to ensure all my Blocks have a background colour set (to r88g88b88), because if it's left as <unspecified>, then the background of the scrollbar will be transparent. In Client-Server 6i, this isn't too bad, as the scrollbar still has a visible 'edge', but in 10.1.2.0.2 WebForms, this edge isn't present, meaning the background of the scrollbar isn't visible at all, just the two ends and a disembodied drag button. Not the end of the world, but some users thought it looked funny.

  • Using Mac 0S X Yosemite, in Print Setting when I select layout / arrows select print settings / there is no Basic drop down box to set color management on or off. I'm using Artisan 835 printer.

    Using Mac 0S X Yosemite, in Print Setting when I select layout / arrows select print settings / there is no Basic drop down box to set color management on or off. I'm using Artisan 835 printer.

    No - I got the iMac 27 because it was calibrated at the factory(?) and was highly recommended by friends and photographers. No complaints  at all, but this printer issue is driving me crazy. I was thinking that if I upgraded to an epson pro printer ICC profile will be on there website. I can't find any for the 835. By the way I didn't calibrate the old dell monitor either and I have had several photos published with no problem at all. Just a note, on epson website there are no printer stating they will run with 10.10 Yosemite. I was looking at the R2000 series. Right now I editing photos that I have to have ready by Jan, maybe by then epson will have something ready.

  • How can i set color some rows in jtable

    hi all,
    i have table with two cols one is id and other name
    i have array of id, i want set color for only those rows in an array
    i tried with the following code but only one row is seting why it is not setting
    the other rows? or this is the worg way what i did?
         model       = new DefaultTableModel(data, header);
            table          = new JTable(model){
                 int mostUsedCols[] = 151,80,185,90,88,95,137,152,153,181,178,179,180,107};
                 public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
                   public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                        Component c = super.prepareRenderer(renderer, row, column);
                               int id = Integer.parseInt(tblLedgerAccounts.getModel().getValueAt(row, 0).toString());
                               for(int j=0; j<mostUsedCols.length;j++){
                                    c.setBackground( id == mostUsedCols[j] ? Color.LIGHT_GRAY : Color.WHITE );
                        return c;
                   }help me to solve this problem
    thanks
    daya

    hello,
    thanks,
    i have table 2 cols(say for ex) 1st column is name and other one is
    id, and i have some array of id's, i need to set the color for these rows
    and remainings rows are defalut color (white).
    I doubt that you need the
    else
    c.setBackground( Color.WHITE );if i did't set like this the entire table get gray.
    >
    since the color should be set to the default by the
    super.prepareRenderer(...) method. In fact this code
    would override the default row selection coloring.
    But maybe I don't understand your requirement. You
    notice my original example always to check to make
    sure the row is not selected before changing the
    background color.here is the demo, i comment this line what will happen c.setBackground( Color.WHITE );
    if not doing right than suggest me.
    import java.awt.Color;
    import java.awt.Component;
    import java.util.Vector;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListSelectionModel;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    public class TableColor extends JFrame {
         public TableColor()
              Vector header = new Vector();
              Vector data   = new Vector();
              header.addElement("ID");//0
              header.addElement("Name"); //1
              header.addElement("village"); //2
              Vector v = new Vector();
              v.addElement(new Integer(1));
              v.addElement("daya");
              v.addElement("DVB");
              data.addElement(v);
              Vector v1 = new Vector();
              v1.addElement(new Integer(2));
              v1.addElement("raju");
              v1.addElement("DVBs");
              data.addElement(v1);
              Vector v2 = new Vector();
              v2.addElement(new Integer(3));
              v2.addElement("James");
              v2.addElement("sdf");
              data.addElement(v2);
              Vector v3 = new Vector();
              v3.addElement(new Integer(4));
              v3.addElement("Naga");
              v3.addElement("DVBsadf");
              data.addElement(v3);
              Vector v4 = new Vector();
              v4.addElement(new Integer(5));
              v4.addElement("xyz");
              v4.addElement("asdf");
              data.addElement(v4);
            DefaultTableModel tblModLedgerAccounts      = new DefaultTableModel(data, header);
            JTable tblLedgerAccounts          = new JTable(tblModLedgerAccounts){
                 int mostUsedCols[] = {2,4,5};
                 public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
                   public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                        Component c = super.prepareRenderer(renderer, row, column);
                               int id = Integer.parseInt(getModel().getValueAt(row, 0).toString());
                               for(int j=0; j<mostUsedCols.length;j++){
                                    if(id == mostUsedCols[j]){
                                         c.setBackground(Color.lightGray);
                                         break;
    //                                else
    //                                     c.setBackground(Color.WHITE);
                   return c;
              JScrollPane scrollPaneLedgerAccounts =     new JScrollPane(tblLedgerAccounts);
              tblLedgerAccounts.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
              this.getContentPane().add(scrollPaneLedgerAccounts);
              setVisible(true);
              pack();
              setTitle("Table Color");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
         public static void main(String args[]){
              new TableColor();
    }thanks
    daya

  • Setting color codes for more than one photo at a time

    Is there any way to set color codes for more than one photo at a time?

    Hi John,
    I will look at keywords. My issue is speed. Right now I am culling and editing an event shoot that spanned a week with 35 separate events and more than 5000 images. So I use the fastest most convenient method I can and it still takes a long time to have a completed and final shoot. On this shoot I will end up with a final set of around 1500 images. Right now I am finishing processing a show that will hang in the Deutsches Amerikanish Zentrum in Stuttgart.
    As I am sure you are aware by now, having seen enough of my inane questions that over the last two years or since Lightroom version 1.xx if I could not figure out how to do something I skipped it. So many things in Lightroom are buried and unless you have a mind like a steel trap (and think that some of you guys in the forum do) locating how to do something is not obvious.
    For example, I only learned (in the last hour) that I could assign colors as a group of selections by using Shift + number. I found this in a side head in Martin Evenings Lightroom book. I still do not know how to find a way to display the color filter "selection" set in Library mode. Is there a way?
    To top it off, Stuttgart Media University asked me if I would add a Lightroom module to my schedule this year. Now I have a compelling reason to learn all those missing pieces that I have created workarounds for. Hence the number of posts you have been seeing from me over the past few of weeks.
    I tell my class that there are no such things as stupid questions, only questions. Now I am practicing what I have been preaching for the last gazillion years. Guys like you have been great.
    My workflow is
    1. I first separate all images by event. I do that at the time of import.
    2. I do a fast pass rejecting all the obviously bad images
    3. I do a second pass grouping the images by sub-group (speeches, people talking, performances, etc.) This is where I run out of selection methods and your key-wording could work but it would probably take too much time to establish a keyword set for a single event. Where I have more than five subgroups I set up different collection sets with one collection for each sub group. However I would like to keep a single event in one collection.
    4. I then select the images to be used by color code.
    5. Next I process the final images (crop develop etc) by collection.
    6. Last I output the set according to client requirement.
    If you have a better workflow, I am all ears.
    By the way, what is your photo specialty and where are you located?
    Jim

  • To set color for barchart having datetime column

    Hi,
       I have a datetime column in the XSD,
    I was trying to set colors for the barchart through,  chart expert --> colorhighlight  ,here in  colorhighlight when i click on new I am getting a dialogue box asking to enter datetime in M:D:YYYY H:MM:SS TT format. why is this dialogue displayed ? How to overcome this.
    Regards,
    Deepa V

    Hi Deepa
    Please inform us with the following information:
    1: What is the version of Crysatl Reports that you are using?
    2: What is the Chart Type that you are uisng?
    3: Where are you placing this chart in the report?
    Regards
    Ashwini Yadav

  • [AS][INDCC] How to set Color Conversion field to No Color Conversion when creating PDF Export preset

    How can i set Color Conversion field in Export to PDF dialog to No Color Conversion when creating PDF Export preset? i have done a bit of searching and have found where it has been recommended to set effective pdf destination profile to use no profile but it doesn't seem to be producting the expected results.

    Yes, it seems that i had to make the change after creation, not while creating the preset. thank you.
    tell application "Adobe InDesign CC"
         set newPreset to make new PDF export preset with properties ¬
              {name:"preset name", standards compliance:none, acrobat compatibility:acrobat 7}
         tell newPreset to set PDF color space to unchanged color space
    end tell

  • Set color for TableCellDesign for a table in readmode.

    My Requirement is dynamic assiging the Tabcelldesgin color for table column, but Table in readonly = false.
    is there any possiblity of assigining the values dunamically.
    Thanks in  advance

    Yes, i have assigned to Table column to set color dynamically for  different conditions.
    But color is visible, when table in read mode.
    My requirement is need to set color, when table in readonly = false.
    Please can any one have the solution for this>

  • How to set color of our specified JTable's row

    i need to set color of our specified JTable's row.so send the coddings of that part.

    i need to set color of our specified JTable's row.so
    send the coddings of that part.I think you misunderstand how this forum works...
    If you have a problem, you post your problem here with example code which demonstrates said problem...
    The people here then attempt to help you if they want to.
    You do not post demands for code examples

  • How to change the color of an arrow

    I'm have difficulty changing the color of an arrow in a Keynote presentation. I've tried to select it by clicking on it, selecting all and pulling the arrow off the picture, but it won't hi-light so I can change it. I've been able to manipulate all other aspects of the presentation but the arrow won't cooperate.
    Thanks for your help!

    Hey Conan! I click to add the arrow and it appears on the page to be positioned and angled (both of which even I can do!) however it is an adorable shade of dark grey and when I click on it it does not go to a colour palette or anything...hints? Thanks - HH

  • How to set color for a tabstrip in BSP

    Hello all,
    Can anyone please let me know how to set color for a tabstripn in BSP?
    I am using the below syntax but it still gives me the default color.
    <htmlb:content design="design2003" >
      <htmlb:page title="test " >
        <htmlb:form>
    <htmlb:tabStrip id         = "TabStrip"
                          bodyHeight = "200"
                          bodyColor  = "red"
                          width      = "700" >
    </htmlb:tabStrip>
    </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks,
    Sandeep

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • Setting Color for Records in forms6i

    Dear All
    How can I set color for particular records on a form. i.e. Set the color of all employees whose salary is greater than 2000 to Red and All the rest to Green
    Solomon

    Hello,
    6i is an old version and I don't remember if there is a Set_Item_Instance_Property() built-in. If yes, you can use it with a Visual Attribute that held the colors.
    Francois

  • How do i set colors on javascript coding page, colors are not seen after installing Firefox version 8

    How do i set colors on javascript coding page, colors are not seen after installing Firefox version 8 . I am using WaveMaker application for web development

    Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    *http://kb.mozillazine.org/Website_colors_are_wrong
    *http://kb.mozillazine.org/Websites_look_wrong

  • How set color for a ValidationTextField's hint?

    I want to set color for a ValidationTextField's hint, to
    implement watermark effect, how do it?

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

Maybe you are looking for

  • Why is an animated GIF not appearing on my webpage?

    I have succesfully built a site that is ready for publication. The client submitted an ad for one of his suppliers that he wants to promote. It is an animated GIF from AVG. I placed it on the home page. It looks great. It shows up in previews. When I

  • How to add files to xcode project with the help of applescript

    i am tried but got some of the error which is enable to solve by myself becuase i am new in applescripting tell application "Xcode" open "Macintosh HD:Users:Nitesh:Desktop:sumeet:RND:iPhone:iPhone_V2_Ref_2.5.01:iPhone_V2.xcodep roj"           tell pr

  • Suddenly I can't drag files from explorer into audition anymore.

    Hi any help on this would be greatly appreciated. I was having some trouble with my m-track ASIO interface drivers so I went through some steps to try and fix this, and made some changes to audition and windows 7. I made some changes listed here http

  • Strange behavior in updating and standbying

    Hi, In the last 4 weeks I've been facing some strange behavior from my iPhone 4. First, sometimes when I pick it up its screen is already on (dimmed) and showing the lock screen (with some elements missing though). Secondly, and more annoying yet, wh

  • Infinity Speed Drops

    Hi all. I sincerely wish that I had taken the time to read up on BT before moving my broadband services over. Unfortunately in my area the choice is rather limited and the offer of Infinity was, in principle, too good to be true. I had my service ins