Scroll pane color for xp look and feel

hi
I am using the xp look and feel for my intranet application. Everything looks great, except for the colors of the scroll pane (added in a table) which still remains brown. I have tried setting the colors of the scroll pane, but nothing seems to work. Where is it that i am going wrong?
Thanks

Use this
table.getParent().setBackground(Color.BLUE);

Similar Messages

  • F2 Edit in JTable -- standard for all look and feel ?

    hi,
    I use a robot to simulate a F2 when a column is in focus in a JTABLE so that user can just type without having to type the <F2> key.
    My question is:
    Is F2 (to get a column in edit mode) for JTABLE standard for all look and feel (metal, X-windows ..) ?
    Thanks.
    Tony

    Read the JTable API. There is a link the gives the
    standard key assignments for the standard LAF's.thanks. got it.

  • Exception for Metouia look and feel

    hi,
    i m getting this exception when trying to change Metouia look and feel.
    like we have 3DLF.jar for ThreeD look and feel.
    if u have any solution pls suggest as soon.
    ThreeDPrefs.internalFrameTitleFont.getSize() 10
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    *     at net.sourceforge.mlf.metouia.MetouiaScrollPaneUI.paint(MetouiaScrollPaneUI.java:89)*
    *     at javax.swing.plaf.ComponentUI.update(Unknown Source)*
    *     at javax.swing.JComponent.paintComponent(Unknown Source)*
    *     at javax.swing.JComponent.paint(Unknown Source)*
    *     at javax.swing.JComponent.paintChildren(Unknown Source)*
    *     at javax.swing.JComponent.paint(Unknown Source)*
    *     at javax.swing.JComponent.paintChildren(Unknown Source)*
    *     at javax.swing.JComponent.paint(Unknown Source)*
    *     at javax.swing.JComponent.paintChildren(Unknown Source)*
    *     at javax.swing.JComponent.paint(Unknown Source)*
    *     at javax.swing.JLayeredPane.paint(Unknown Source)*
    *     at javax.swing.JComponent.paintChildren(Unknown Source)*
    *     at javax.swing.JComponent.paint(Unknown Source)*
    *     at javax.swing.JComponent.paintToOffscreen(Unknown Source)*
    *     at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)*
    *     at javax.swing.RepaintManager.paint(Unknown Source)*
    *     at javax.swing.JComponent._paintImmediately(Unknown Source)*
    *     at javax.swing.JComponent.paintImmediately(Unknown Source)*
    *     at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)*
    *     at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)*
    *     at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)*
    *     at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)*
    *     at java.awt.event.InvocationEvent.dispatch(Unknown Source)*
    *     at java.awt.EventQueue.dispatchEvent(Unknown Source)*
    *     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)*
    *     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)*
    *     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)*
    *     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)*
    *     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)*
    *     at java.awt.EventDispatchThread.run(Unknown Source)*

    [Look and Feel|http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/index.html]

  • Accessing File/Folder icons for current Look and Feel

    Hi,
    I'm looking to get the Icon for files and folders that the current UIManager uses for some work I'm doing. Please could you help.
    I'm getting strange results from the method I'm using, which is to create a temporary file and do: Icon i = FileSystemView.getFileSystemView().getSystemIcon(tempFile);
    I don't like the idea of having to create a temporary file to do this - isn't there another way to do it? - for instance asking "get default file icon"/"get default folder icon".
    I could download a jpg image of the file/folder icons, but this is static - and I want my method to get the icons used for the current look and feel I'm using.
    There must be a simple way to do this right? I mean, java uses a method to get the icons for the current look and feel.. Oh.. Please help!
    - Edd.

    Try these:
    UIManager.getIcon("FileView.directoryIcon");
    UIManager.getIcon("FileView.fileIcon");Leif Samuelsson
    Java Swing Team
    Sun Microsystems, Inc.

  • Problem With ButtonUI in an Auxiliary Look and Feel

    This is my first post to one of these forums, so I hope everything works correctly.
    I have been trying to get an axiliary look and feel installed to do some minor tweaking to the default UI. In particular, I need it to work with Windows and/or Metal as the default UI. For the most part I let the installed default look and feel handle things with my code making some colors lighter, darker, etc. I also play with focus issues by adding FocusListeners to some components. I expect my code to work reasonably well no matter what the default look and feel is. It works well with Motif, Metal, and Windows, the only default look and feels I've tested with. What I'm going to post is a stripped down version of what I have been working on. This example makes gross changes to the JButton background and foreground colors in order to illustrate what I've encountered.
    I have three source code files. The first, Problem.java, creates a JFrame and adds five buttons to it. One button installs MyAuxLookAndFeel as an auxiliary look and feel using MyAuxButtonUI for the look and feel of JButtons. The next button removes that look and feel. The next button does nothing except print a line to System.out. The next button installs MyAuxLookAndFeel as an auxiliary look and feel using MyModButtonUI for the look and feel of JButtons. The last button removes that look and feel.
    The problem is, when I install the first auxiliary look and feel, buttons are no longer tabable. Also, they cannot be invoked by pressing the space button when they're in focus. When I remove the first auxiliary look and feel everything reverts to behaving normally. When I add the "Mod" version, button tabability is fine. The only difference is I've added the following code:
    if ( c.isFocusable() ) {
       c.setFocusable(true);
    }That strikes me as an odd piece of code to profoundly change the program behavior. Anyway, after adding and removing the "Mod" look and feel, the tababilty is forever fixed. That is, if I subsequently re-install the first look and feel, tababilty works just fine.
    The problem with using the space bar to select a focused button is more problematic. My class is not supposed to mess with the default look and feel which may or may not use the space bar to press the button with focus. When the commented code in MyModButtonUI is uncommented, things behave correctly. Even the statement
    button.getInputMap().remove( spaceKeyStroke );doesn't mess things up after the auxiliary look and feel is removed. So far I've tested this with JRE 1.4.2_06 under Windows 2000, JRE 1.4.2_10 under Windows XP, and JRE 1.5.0_06 under Windows XP and the behavior is the same.
    All of this leads me to two questions.
    1. Is my approach fundamentally flawed? I've extended TextUI and ScrollBarUI with no problems. This is the only problem I've encountered with ButtonUI. My real workaround for the space bar issue is better than the one I've supplied in the example, but it certainly is not guaranteed to work for any arbitrary default look and feel.
    2. Assuming I have no fundamental problems with my approach, it's possible I've found a real bug. I searched the bug database and couldn't find anything like this. Of course, this is the first time I've tried seasrching the database for a bug so my I'm doing it badly. Has this already been reported as a bug? Is there any reason I shouldn't report it?
    What follows is the source code for my example. It's in three files because the two ButtonUI classes must be public in order to work. Thanks for insight you can provide.
    Bill
    File Problem.java:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Problem extends JFrame {
       public boolean isAuxInstalled = false;
       public boolean isModInstalled = false;
       public LookAndFeel lookAndFeel = new MyAuxLookAndFeel();
       private static int ctr = 0;
       public static void main( String[] args ) {
          new Problem();
       public Problem() {
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setSize(250, 150);
          setTitle("Button Test");
          JButton install = new JButton("Install");
          JButton remove = new JButton("Remove");
          JButton doNothing = new JButton("Do Nothing");
          JButton installMod = new JButton("Install Mod");
          JButton removeMod = new JButton("Remove Mod");
          this.getContentPane().setLayout(new FlowLayout());
          this.getContentPane().add(install);
          this.getContentPane().add(remove);
          this.getContentPane().add(doNothing);
          this.getContentPane().add(installMod);
          this.getContentPane().add(removeMod);
          install.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( !isAuxInstalled ) {
                   isAuxInstalled = true;
                   UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          remove.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( isAuxInstalled ) {
                   isAuxInstalled = false;
                   UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          doNothing.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                System.out.println( "Do nothing " + (++ctr) );
          installMod.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( !isModInstalled ) {
                   isModInstalled = true;
                   UIManager.addAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          removeMod.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                if ( isModInstalled ) {
                   isModInstalled = false;
                   UIManager.removeAuxiliaryLookAndFeel( lookAndFeel );
                   SwingUtilities.updateComponentTreeUI( Problem.this );
          setVisible(true);
       class MyAuxLookAndFeel extends LookAndFeel {
          public String getName() {
             return "Button Test";
          public String getID() {
             return "Not well known";
          public String getDescription() {
             return "Button Test Look and Feel";
          public boolean isSupportedLookAndFeel() {
             return true;
          public boolean isNativeLookAndFeel() {
             return false;
          public UIDefaults getDefaults() {
             UIDefaults table = new MyDefaults();
             Object[] uiDefaults = {
                "ButtonUI", (isModInstalled ? "MyModButtonUI" : "MyAuxButtonUI"),
             table.putDefaults(uiDefaults);
             return table;
       class MyDefaults extends UIDefaults {
          protected void getUIError(String msg) {
    //         System.err.println("(Not) An annoying error message!");
    }File MyAuxButtonUI.java:
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.plaf.*;
    import javax.swing.plaf.multi.*;
    import javax.accessibility.*;
    public class MyAuxButtonUI extends ButtonUI {
       private Color background;
       private Color foreground;
       private ButtonUI ui = null;
       public static ComponentUI createUI( JComponent c ) {
          return new MyAuxButtonUI();
       public void installUI(JComponent c) {
          MultiButtonUI multiButtonUI = (MultiButtonUI) UIManager.getUI(c);
          this.ui = (ButtonUI) (multiButtonUI.getUIs()[0]);
          super.installUI( c );
          background = c.getBackground();
          foreground = c.getForeground();
          c.setBackground(Color.GREEN);
          c.setForeground(Color.RED);
       public void uninstallUI(JComponent c) {
          super.uninstallUI( c );
          c.setBackground(background);
          c.setForeground(foreground);
          this.ui = null;
       public void paint(Graphics g, JComponent c) {
          this.ui.paint( g, c );
       public void update(Graphics g, JComponent c) {
          this.ui.update( g, c );
       public Dimension getPreferredSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getPreferredSize( c );
          return this.ui.getPreferredSize( c );
       public Dimension getMinimumSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getMinimumSize( c );
          return this.ui.getMinimumSize( c );
       public Dimension getMaximumSize(JComponent c) {
          if ( this.ui == null ) {
             return super.getMaximumSize( c );
          return this.ui.getMaximumSize( c );
       public boolean contains(JComponent c, int x, int y) {
          if ( this.ui == null ) {
             return super.contains( c, x, y );
          return this.ui.contains( c, x, y );
       public int getAccessibleChildrenCount(JComponent c) {
          if ( this.ui == null ) {
             return super.getAccessibleChildrenCount( c );
          return this.ui.getAccessibleChildrenCount( c );
       public Accessible getAccessibleChild(JComponent c, int ii) {
          if ( this.ui == null ) {
             return super.getAccessibleChild( c, ii );
          return this.ui.getAccessibleChild( c, ii );
    }File MyModButtonUI.java:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.plaf.*;
    public class MyModButtonUI extends MyAuxButtonUI
       static KeyStroke spaceKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0 );
       public static ComponentUI createUI( JComponent c ) {
          return new MyModButtonUI();
       public void installUI(JComponent c) {
          super.installUI(c);
          c.setBackground(Color.CYAN);
          if ( c.isFocusable() ) {
             c.setFocusable(true);
    //      final JButton button = (JButton) c;
    //      button.getInputMap().put( spaceKeyStroke, "buttonexample.pressed" );
    //      button.getActionMap().put( "buttonexample.pressed", new AbstractAction() {
    //         public void actionPerformed(ActionEvent e) {
    //            button.doClick();
    //   public void uninstallUI(JComponent c) {
    //      super.uninstallUI(c);
    //      JButton button = (JButton) c;
    //      button.getInputMap().remove( spaceKeyStroke );
    //      button.getActionMap().remove( "buttonexample.pressed" );
    }

    here is the code used to change the current look and feel :
    try {
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
             catch (InstantiationException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (ClassNotFoundException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (UnsupportedLookAndFeelException e)
                  System.out.println("Error occured  "+ e.toString());
             catch (IllegalAccessException e)
                  System.out.println("Error occured in .. " + e.toString());
             Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
             Fenetre fen = new Fenetre();
             fen.setSize(dim.width, dim.height);
             fen.setResizable(false);
                 fen.setLocation(0, 0);
                  fen.setVisible(true);

  • How can I include a JSP, Maximized, and retain look and feel(WSRP)

    I have created a page group and defined a root page with a certain look and feel. There are two portlets on the page. Once the user clicks on a submit button, the portlet performs some action and includes a jsp included in the EAR file. The portlet needs to maximize the UI to display the jsp correctly.
    Once control returns back to the screen, the look and feel is lost and uses Oracle's default style. I have two questions:
    1. From the portlet, how can I retain the look and feel of the page group when referencing "external" jsp (i.e JSPs in the deployed portal EAR file).
    2. How can I "redirect" the user to the home page in a standard way? If there is not a standard way, how do I use the Oracle specific utilities to do it?
    All of my JSPs are developed externally out of the scope of the Oracle Portal.
    Environment - Oracle Portal 10.1.4 on Release 2 using WSRP to contact Oracle Release 3, hosted EAR file (WSRP Producer).
    Thanks in advance.

    Hi José,
    I don't think that is possible. But you can import the css files that ep uses for its look and feel and try to give your web pages similar look and feel. The tables and other controls used in EP are totally different and are done through complex JavaScript coding instead of simple HTML tags. If you want exact lok and feel then i thin you must go for a Webdynpro based application rather then a J2EE application with JSPs.
    Regards,
    Guru.
    PS: Give points for helpful replies.

  • How can I include a portal component look and feel in a java servlet

    Does any body know how can i include a portal component look and feel (tables, buttons, etc) in a java servlet?

    Hi José,
    I don't think that is possible. But you can import the css files that ep uses for its look and feel and try to give your web pages similar look and feel. The tables and other controls used in EP are totally different and are done through complex JavaScript coding instead of simple HTML tags. If you want exact lok and feel then i thin you must go for a Webdynpro based application rather then a J2EE application with JSPs.
    Regards,
    Guru.
    PS: Give points for helpful replies.

  • Themed look and feel broken in sub-site

    We have several site collections in a farm using SP2013 + SP1 under a common web application that use a custom theme for the look and feel. After upgrading to SP2013 December 2014 CU, one of the site collections' custom theme is broken. Furthermore,
    the same site collection cannot use most of the OOTB themes. I have only successfully gotten the theme "Office" to work correctly. (I have not tested all the OOTB theme choices)
    Immediately after the CU was applied the CSS and JS on this site collection was not working. After changing the theme to "Office" I was able to test out other troubleshooting options. If I select another theme choice, the "try it out"
    page returns with an error "A cobalt error was thrown." This is not a helpful error for me and I could not find much on the internet regarding it. Another error I have received was "file not found", or yet another error "The
    URL
    '_catalogs/theme/Themed/4F147962/likefull.11x11x32-F47391E9.themedpng' is
    invalid.  It may refer to a nonexistent file or folder, or refer to a valid file
    or folder that is not in the current Web." I have not been able to fix the issue.
    I have found that under 'Site Settings' -> 'Web Designer Galleries' -> 'Themes' -> 'Themed' is a library of folders. My thought is that these folders are created dynamically when a new theme is applied. I have several folders, but all are empty
    except one. I am now trying to determine why these folders are empty.
    Any ideas?

    Hi,
    Please try to update the latest CU for SharePoint 2013(April 2015 CU for SharePoint 2013), then check whether the issue still exists or not.
    http://blogs.technet.com/b/stefan_gossner/archive/2015/04/14/april-2015-cu-for-sharepoint-2013-has-been-released.aspx
    In my test environment, the 'Themed' all folders are not empty.
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • HT4623 I have just updated to ios7 on my iphone and don't like the look and feel of this update. Where are all the colors and texture of all the older isos, all those white background colors,yuk. Is a way to go back to the ios6

    I have just updated to ios7 on my iphone and don't like the look and feel of this update. Where are all the colors and texture of all the older isos, all those white background colors,yuk. Is a way to go back to the ios6

    "Unlike".  iOS 7 doesnt display well on my 4S. iOS 6.1.3 should still be supported for older hardware.  I think I shall me moving to Samsung Galaxy now.  Was really hoping hte new iphone would get a bit larger.

  • Changing look and feel for one INSTANCE of a component

    I am trying to change the look and feel of just ONE instance of a component. In particular, I want to change the color of the JScrollBar thumb on a certain JScrollPane. I want this change to not affect any other component, either before or after. How can I do this?? Any help would be much appreciated.
    AC

    Hi acalvin3!
    I have a solution. Use the UIManagers database. You should overwrite the default settings for the resource you want to change, the code is self explaining:
          UIManager.put( "Button.margin", commonMargin );
          UIManager.put( "Button.focusInputMap", commonInputMap );
          UIManager.put( "Button.font", buttonFont );To reset values you only have to use
          UIManager.put( "Button.margin", null );
          UIManager.put( "Button.focusInputMap", null );
          UIManager.put( "Button.font", null );Set values before you create your component and reset values immedeately after you created your component, otherwise you may affect other components too.
    With following code you can find out default values for the whole UIManagers database:
          Hashtable defaultProps = UIManager.getDefaults();
          Enumeration enum = defaultProps.keys();
          while (enum.hasMoreElements()) {
             Object key = enum.nextElement();
             System.out.println( "key: '" + key + "'\t value: '" + defaultProps.get(key) + "'" );
          }You just have to look for the output for the component you want to change the look and feel.
    Have fun...

  • I just updated iOS on my iPhone 5. What a shock!! Where is the premium look and feel I bought my iPhone for? If I wanted the lokale feel of iOS 7.0 I would have bought a much cheeper taiwanese smartphone. Please let me know how I can return to the origina

    I just updated iOS on my iPhone 5.
    What a shock!! Where is the premium look and feel I bought my iPhone for?
    If I wanted the lokale feel of iOS 7.0 I would have bought a much cheeper taiwanese smartphone.
    Please let me know how I can return to the original look and feel of the iPhone surface I bought my phone for.

    You had plenty of time to look at screenshots on the internet and read various blog posts about iOS 7.

  • How do I get a more modern look and feel for a compiled help file

    I gather from reading various posts that there is no easy way
    to generate a .chm file with a more modern look and feel (am I
    right about this?). Are there no plug-ins available from Adobe that
    will enable us to generate a help file that looks more modern?
    I hesitate to move to flash help or something like that
    because, of course, then the developers would have to hookup the
    hundreds of dialog boxes we have in our product to the new files. I
    also think that having one file is way easier to manage in terms of
    getting updated help to the customers. What are online Help
    developers generally delivering for apps where users are not
    connected to the Internet except perhaps periodically while using
    the software? I'm a writer (not a developer) so need soemthing that
    is easy to implement :-)
    Thanks for your help. It is much appreciated.

    To add to the advice already offered, you can apply a skin to
    a CHM file which allows you to customise it. However as with most
    things there are issues with this approach. You can read about this
    by downloading Rick Stone's excellent
    tips
    'n tricks file. Just look in the index under "skins". Something
    else you may want to look at is the beta of Adobe's
    AIR.

  • How to change the look and feel for Heading of quick launch menu in project server 2010

    Hi
    can someone tell me how to change the look and feel of Header names in quick launch.
    I want the header to be displayed in Bold with Underline to it.
    could this be possible for just header in quick launch in project server 2010. 

    Hi Rohan
    It does not work this way. You have to use a content editor webpart.
    See references below that might help you starting with this customisation:
    Http://go4answers.webhost4life.com/Example/sharepoint-2010-quick-launch-look-feel-78379.aspx
    Http://m.sharepointpromag.com/sharepoint/four-ways-add-or-remove-quick-launch-menu-control
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Change XP Look and Feel Rollover Highlight Color

    Is it possible to change the orange rollover highlight color that is used in the Windows XP Look and Feel? If so, how? I want to change it in once place and see the results on every component in my application.

    By the way, I'm using 1.5

  • I want to restore the look and feel of Firefox 3.6 etc with large icons for last page next page reread and home page located off the toolbar in the upper left like 3.6

    I want 4.0 to look like 3.6 with large separate icons for last page, next page, reread current page and go to home page, in lieu of the little icons to the right of the
    default navigation toolbar. I tried setting up a separate toolbar but it never reappeared. There should be a way to just restore 3.6 look and feel. Otherwise I will go back to 3.6.

    You can make Firefox 4 look and behave more like Firefox 3.6, for details see http://www.computertechtips.net/64/make-firefox-4-look-like-ff-3-6

Maybe you are looking for