Color behind the tabbs of JTabbedPane in SCROLL layout

Hi all, This is a repost as no one gave me a solution for this problem.
When SCROLL_TAB_LAYOUT is specified, the color behind the tabbs is not the color of its container. With WRAP layout, the color behind the tabbs is the color of its container.
Is this a bug? or am I doing wrong?
If one can execute this code, it would be clear of what I am talking about. Just comment out the tabbPane.setTabLayoutPolicy line and run it again to see the actual behaviour.
JTabbedPane tabbPane = new JTabbedPane();
tabbPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
tabbPane.setBackground(Color.white);
tabbPane.add("one",new JPanel());
tabbPane.add("two",new JPanel());
JPanel parentPanel = new JPanel(new BorderLayout());
parentPanel.setBackground(Color.red); // the color i want to be appeared as the background for tabbed pane and not for tabbs.
parentPanel.add(tabbPane,BorderLayout.CENTER);
JFrame jf = new JFrame();
jf.getContentPane().add(parentPanel);
jf.pack();
jf.setVisible(true);
Thanks in advance.

Maybe this:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4690946
Bug ID:      4690946
Votes      6
Synopsis      REGRESSION: JTabbedPane.setBackground() and setOpaque() have no effect
Category      java:classes_swing
Reported Against      1.4
Release Fixed      1.5(tiger)
State      Closed, fixed

Similar Messages

  • Colors of the datgrid cell change on scrolling

    Hi,
    This issue is regarding datagrid. I am working on a functionality which involves the coloring of datagrid cell. When the user clicks a cell, a dropdown appears having the color names. This dropdown is a separate component which has been set as the item editor of the datagrid column. After selecting the color form the dropdown, the color gets applied to the clicked cell through a custom item renderer applied to the column. A method in the custom item renderer has the code for drawing a graphic with the color selected by the user. Now the issue is that whenever, we scroll, the colors in the datagrid cells get shifted downwards. This also happens if I move to the other tabs and come back to this tab having the datagrid.
    If the color of the first and second cell in a column is changed, when I scroll horizontally, the colors in the first and second cell get shifted to the third and fourth cell and so on...This also happens when we switch across the tabs...
    What I understand is that on scrolling the updateDisplayList gets called. That is why the color changes...But how to retain the colors selected by the user.
    Thanks in advance.
    Regards,
    Shally

    Hi,
    Pls check your the item renderer. You must need to mentioned code as below inside your item Renderer.Then it should work fine.
    override public function set data(value:Object):void
    super.data = value;
    For more details you can check this thread.Although it is for the List but you can do similarly for the datagrid.
    http://forums.adobe.com/message/2118862#2118862
    with Regards,
    Shardul Singh Bartwal

  • Can you change the color behind the wallpaper on an iPad?

    Hi, there! As I'm sure other people have noticed, finding wallpapers in the 768x1024 resolution can be rather... difficult. So instead of being picky, I'd rather just find ones that might not quite fit and have the iPad do the work for me.
    That being said, it's quite ugly always having a black background behind my images when they don't fill up the whole screen (particularly on a white iPad). Is there some way to change the color behind my image?
    Thanks!

    Ahh, I see. How unfortunate. ):
    When I attempt to zoom where I'd like, it often isn't smart enough to do it properly after I select home/lock screen and pushes it to an awkward part of the screen (like to the bottom cutting it half off). I guess my big problem is just wanting it to look good both horizontal and vertical.
    Thanks, anyway. (:

  • Is there a way to change to different colors on the bottom behind the apps?

    I want to know if there is a way to change the background color behind the apps at the bottom of the screen and in the folder with multiple apps in it.

    The color in both of these areas is a fogged version of the background wallpaper image behind the area. If you want something different choose a different wallpaper.

  • Color behind text transfer to epub

    I put in the color behind the text and when it transports to epub, there is no color. If I rasterzie it then the font changes and it is smaller than what I put in.  I am using articles and attaching the images to the text. This is for a children's book so want the color to meld with the image at times.
    Thanks
    Jen

    My experience is that you can't apply a background color to the main text flow frames, even if you apply an object style with a background color
    However, if you have sidebar frames or caption frames which are anchored or inset in the main flow, and if you apply an object style with a background color, those frames retain the color.
    Keep in mind that many eReaders (e.g., iPad) let you choose a different background color with which to display an eBook—for example, Sepia or Night, on an iPad.

  • Changing Highlight Color Behind Theme Button

    Hello -
    I've scoured this message board and saw similar postings, but none that answered my question on how to change the highlight color behind the theme button. I put together a DVD w/button themes that play the videos inside, and when my friend goes to click on the buttons, in order to play that chapter, he sees the 'white highlight' that represents which button he is selecting. He has asked me if I can change that highlight color - is this something I can do in iDVD5? Thanks!!

    Happy editing!
    Part 1: Basic Custom Button Creation
    http://www.creativemac.com/articles/viewarticle.jsp?id=31388
    Part 2: More on Custom Buttons and Highlights
    http://www.creativemac.com/articles/viewarticle.jsp?id=31517
    Part 3: Creating Motion Buttons and Motion Masks
    http://www.creativemac.com/articles/viewarticle.jsp?id=31843
    Part 4: Changing highlight colors on buttons
    http://www.digitalproducer.com/articles/viewarticle.jsp?id=32284
    Part 5: Creating custom drop zones
    http://www.digitalproducer.com/articles/viewarticle.jsp?id=32445
    Sue

  • Calendar on iOS 7. Anyone noticed that when you enter text into the "notes section" of a day, the text disappears behind the keyboard rather than scrolling down to keep pace with text entry ? Looks like an 7 glitch to me ?

    Calendar on iOS 7. Anyone noticed that when you enter text into the "notes section" of a day, the text disappears behind the keyboard rather than scrolling down to keep pace with text entry ? Looks like an 7 glitch to me ?

    Doesn't do that for me. Try resetting the phone

  • Enable "scrolling preview" behind the Crop Pages dialog box in Acrobat 9 ?

    Hi everyone,
    I want to be able to preview the crop marks (when you click on "Document" and choose "Crop Pages" or Shift+Ctrl+T) before actually cropping all the pages of my documents. When the crop tool dialog box is showing, you can see behind it the crop marks that look like guides. In Acrobat 5, you could scroll the pages even with the crop tool box showing in front of your pages. This way, you could see the crop marks or "guides" on all the pages. But, in version 9, when the crop box is showing, you can only see the crop marks on the page(s) you're working on. You can't scroll behind the box to see what the others pages look like with the crop marks. I've uploaded print screens to make myself a bit more clear (Acrobat 5 vs Acrobat 9) :
    http://localhostr.com/files/0484a8/acro5vs9_crop.png
    If someone knows a way to get the crop preview scrolling back, maybe with a plugin or Javascript, please let me know ! 
    Thank you all for your help. 
    Paul B.

    Can somebody please help me? Nothing I do seems to open up the "crop dialog box".
    I start with Edit > Edit Text & Images. Then, I click the crop symbol, and set the ranges of my desired crop. Then I want to apply this crop, but nothing works.
    I've tried:
         - Double Clicking Inside the selected crop-box
         - Double Clicking Outside the selected crop-box
         - Triple Clicking
         - Quadruple Clicking
         - CTRL-SHIFT-T
         - Hitting Enter
         - Right clicking
         - Searching endlessly for some sort of button pertaining to "apply crop", to no avail.
         - Changing to different PDF type (scanned, instead of text-to-pdf) and trying again
         - Yelling
         - Punching
         - Crying
    None of the afforementioned seems to work.
    Help please?

  • What is the logic behind the list of default colors in the color tab of the score options in the project settings interface?

    I desperately want to know why each note is assigned it's particular color in the score tab of the projects settings interface...
    Was this done at random or is there some logic behind it all?  Einstein and Newton have completely different ideas about note/color association...their theorys can be easily found on the internet.  I've messed around with applying their ideas to the user pallette just for fun.  Now, I really want to know if the makers of Logic chose the colors they did for the factory defaults for a particular reason.  Please help if you can!

    hi,
    it's retrieve data from table /BIC/AT07_O00600
    and add to data package, so your records will be more than from source
    hope this helps.

  • Change color of the scroll bar?

    I am trying to turn my entire application black with white or some light colored text.
    Is there some way I can change the color of the scroll bar?
    Also, if I have a JTable, there is a bright grey border I would like to dim down a bit.
    Any guidance would is appreciated.

    Hi,
    This code will show you the current UI settings.
    If you want to change ie. the scrollbar background use:
    UIManager.put("Scrollbar.background", your Color);
    Hope this helps.
    Regards,
    Matt
    Java Developer Technical Support
    Sun Microsystems
    import javax.swing.UIManager;
    import javax.swing.UIDefaults;
    import java.util.*;
    class UIList {
        public static void main(String args[]) {
            // Groups of item objects
            Vector itemGroups = new Vector();
            Hashtable itemList = new Hashtable();
            UIDefaults uiDefaults = UIManager.getDefaults();
            for (Enumeration enum = uiDefaults.keys(); enum.hasMoreElements(); ) {
                Object setting = enum.nextElement();
                String settingName = setting.toString();
                int dotIndex = settingName.indexOf(".");
                if (dotIndex != -1)
                    settingName = settingName.substring(0, settingName.indexOf("."))
                if (itemList.containsKey(settingName)) {
                    Integer groupNum = (Integer)itemList.get(settingName);
                    Vector group = (Vector)itemGroups.elementAt(groupNum.intValue())
                    group.add(setting);
                else {
                    itemList.put(settingName, new Integer(itemGroups.size()));
                    Vector group = new Vector();
                    group.add(setting);
                    itemGroups.add(group);
            for (int counter = 0; counter<itemGroups.size(); counter++) {
                Vector items = (Vector)itemGroups.elementAt(counter);
                System.out.println("");
                for (int counter2 = 0; counter2<items.size(); counter2++) {
                    Object setting = items.elementAt(counter2);
                    System.out.println(setting + " = " + uiDefaults.get(setting));
            System.out.println("\nDone.");
            System.exit(0);
    }

  • How do i change font sizes and colors in ical in OS Lion.  Everything is greyed and too small.   And how do I changed the color of the scroll bars, which are now invisible?

    how do i change font sizes and colors in ical in OS Lion. Since upgrading,  all fonts are grey, instead of black,  and too small.   And how do I changed the color of the scroll bars, which also are grey and almost invisible?  And if you can asnwer this, can you tell me how to get back the email format I had before the upgrade?  I no longer have column headings and I'd like them.  Thank you. 

    Do you know about changing the font colors for ical, and the color of the scroll bars?
    No, I don't. I don't use that program; I fiddled with it just now, and could not find a way to do that.
    Perhaps someone else will have an idea.

  • Drag JTabbedPane out of the main Frame and set scroll bars for the tabs

    hi ,
    Iam working on a Swing application . In it i have Six Tabs added to a single JTabbedPane. all the tabs are different class files . is it possible to drag any of the tabs out of the frame.
    how to add scroll bars for the tabs individually. i have tried adding JScrollPane to the main frame and add the JTabbedPane to the Scrollpane . the scroll bar was not visible and i have tried adding
    all the six tabs to the individual JScrollPanes and add the six scrollpanes to the TabbedPane .
    only the scroll arrows are visible , when i minimised or resized the application the scrollbars were not appearing .
    could any one help me to solve the above two problems.

    just trying.....
    public void mouseDragged(MouseMotionEvent e){
    // this event should be activated only when the Drag goes out of scope of the parent JFrame which i dont know how
    Component c=JTab.getComponentAt(JTab.getSelectedIndex());
    JFrameobj.getContentPane().add(c,"Center");
    }

  • Ihave had to buy 2 chargers due to the fact that the square adapter was left behind,,, the charger is the same color as the face plate and was not noticed. Can you buy just the square adapter instead of the whole unit?

    I have had to buy 2 chargers due to the fact that the square part of the adapter separated from the cord and was not noticed and left behind in the hotel (same color of the faceplate)
    Can you purchase this part separate from the complete unit.?
    This is a very costly design issue. i'm sure many have done the same.

    Apple does not sell the power adapter separately from the cable. If it was the power adapter that was taken - I'm not certain from the way you phrased things - you'll have to buy both:
    http://store.apple.com/us/product/MB352LL/C
    If it's the cable you're missing, you can buy that separately:
    http://store.apple.com/us/product/MA591G/B
    Regards.

  • Can you no longer have a background color for the text box in the new version of hp photo creations

    just updated to the new version of HP Photo Creations, used to be able to have a colored background for the text box - is that no longer possible in this new (not better) version????!!!!! Uuuuuuuuuugh

    Hi Lainey.
    Thanks for asking. We're working on bringing back that feature. In the meantime, here's another way to add text backgrounds: Add a placeable graphic and then click the Arrange button to send it to the back, behind the text.
    That approach also gives you more interesting shapes. The new alignment guides make it a snap to align a graphic with a text box. In the example below (it may take a day for the image to show up here), I also used the new Premium Editing Features to change the color of the graphic.
    P.S. — Applying a thick border to an empty text box (also using the Premium Editing Features) is another way to create a background shape. That has the advantage of letting you pick any color for the box. You'll also find several new text styles at the bottom of the new text menu.
    Let us know if we can help further,
    RocketLife 
    RocketLife, developer of HP Photo Creations
    » Visit the HP Photo Creations Facebook page — news, tips, and inspiration
    » See the HP Photo Creations video tours — cool tips in under 2 minutes
    » Contact Customer Support — get answers from the experts

  • Is there a way to make comments "move to the back", behind the text and lines?

    Is there a way to make comments "move to the back", behind the text and lines?
    I am using Acrobat X Standard to "highlight" lines using comments lines at 12pt width and 50% opacity on DWG files converted to PDF.  The opacity setting makes the text and lines readable behind the highlighting, but the colors do not print well.  Moving the highlighting behind the existing text and lines would allow me to use 100% opacity with more vibrant colors.
    Before, we highlighted by hand, but those colors do not scan or copy well.  Digitizing the highlighting is cleaner, and can be edited without starting over.  The "comments" lines can be applied by Acrobat Reader, Acrobat Standard, and Acrobat Pro, so there's an advantage.  Even more important is that the average file size of an 11x17 print that is highlighted and scanned in color is 1000 KB, while doing it this way, they tend to be 100-150 KB, and the text remains searchable. If there's another system that people use, I'm open to that instead.  I haven't looked in to doing the highlighting in AutoCAD.
    Naturally, everything I'm doing is protected, and cannot be shared, sorry.
    Thanks.
    Message was edited by: Nathan Goldblatt

    No, that's not really an option.

Maybe you are looking for

  • Report data shows up in Builder but not when run on web

    I have a report that pulls up the data just fine when run in Builder but when I run it on the web, it shows up, no errors, with no data...just blank. I am using a global temp table to do this. Any ideas on what might cause this to happen? Thank you f

  • Trade law in "Book depreciation area per trader law"

    Hi team gurus, when i try CJ88 settlement (settlement from AUC to final assets), i found the amount  according to trade law (assets) doesn't equal to the amount in Val/CO Area. And i found book depreciation area per trader law was mentioned many time

  • Export to XML is grayed out.

    Hello.  I am trying to export an XML from FCPX for an editor to use in Avid.  My problem is that I highlight all the clips in the timeline and then I go to the top menu and try choose File  / Export XML and Export XML is grayed out, so I may not choo

  • My settings on my iPod touch is not loading

    I was deleting things on my iPod for more space and now it will not load Help?

  • Can't open (utility) system information.

    Hi, I can't look at the imac's about more info. so, when I click the button "more info", nothing, and I can't open the system information. How is it fix? thanks.