Background color in side panels

If you can see my page....
http://ericdelabarre.com/main.asp
you can see the right and left sides of my website are this blueish
color...and since I've just took over managing my site with
Dreamweaver, I can't find how to change that color....I think it's
an image, but can't find the image in my images folder. Any idea as
to how I change that to white?
Thanks,
Eric

quote:
Originally posted by:
Newsgroup User
it is the background here:
<body bgcolor="#FFFFFF" background="/images/BG2.jpg"
text="#99CC99"
link="#FFFF00" vlink="#669900" alink="#FFFFFF" leftmargin="0"
topmargin="0"
rightmargin="0" marginwidth="0" marginheight="0"
ONLOAD="preloadImages();"
ONUNLOAD="checkExit();">
Ken Ford
Adobe Community Expert Dreamweaver/ColdFusion
Fordwebs, LLC
http://www.fordwebs.com
"Rookie Eric" <[email protected]> wrote in
message
news:g7djj1$53e$[email protected]..
> If you can see my page....www.iwillremember.com you can
see the right and
> left
> sides of my website are this blueish color...and since
I've just took over
> managing my site with Dreamweaver, I can't find how to
change that
> color....I
> think it's an image, but can't find the image in my
images folder. Any
> idea as
> to how I change that to white?
>
> Thanks,
> Eric
>
yes above code is correct frm my point of view

Similar Messages

  • Batch process background color either side of artwork image

    I need to batch process the background color from several galleries from white to gray.
    On this page - Simon Toparovsky - A Letter from The Renaissance - some of the images in the gallery have a white background on the left and right side of the artwork.  There are hundreds of images that I need to apply this to.
    Thanking you in advance for any insight into the process.

    Hi
    Please follow the following link  may be it will be helpful
    http://tv.adobe.com/watch/understanding-adobe-photoshop-cs6/batch-processing/
    It may be be helpful
    Thanks

  • Background color of front panel when printing

    My vi has a control named "print" which allows the user to print the front panel during execution. The background color of the front panel is white, to avoid filling the printed page with any color. In labview 7.1 (and also 6.0), this worked perfectly. I recently updated to labview 8 and now the background color of the print is gray. Does anybody have any idea how to avoid this?
    I am using the "print panel.vi" found in the "vi.lib\utility\printvi.llb". I also tried with the "Easy Print VI Panel or Documentation.vi", with the same result. The same problem also occurs when exporting the front panel to a ".png" file.
    Best regards

    I tried with different colors, without any success.
    I think that this is a bug !  Good catch !
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Background color bug.vi ‏11 KB

  • Problem with changing background colors in JPanels

    Hi,
    I have made an applet with Grid Layout and I have added JPanels in each grid. I have assigned a background color to all panels.
    Now what i am trying to do is, change the clicked JPanel's background color to "blue" on a mouse click and convert the previous changed JPanel's background to originally assigned color.
    This is the code that I have used:
    JPanel temp=null, m;
    String tempc, m_color;
    public void mouseClicked(MouseEvent me)
              m=(JPanel)me.getComponent();
              if(m!=temp)
              m_color=m.getBackground().toString();   // retaining current background color so as to change later
              m.setBackground(Color.blue);
                   if(temp!=null) 
                        temp.setBackground(Color.getColor(tempc));  // change back to original color
              tempc=m_color;       //tempc and m_color are Strings
              temp=m;               //temp and m are JPanels
         }When I am executing the above logic, background color changes to blue on a mouse click but the previously changed JPanel is not changing back to original color.
    Can anyone please tell where is the above logic going wrong??
    Thanks
    Rohan

    Hi Camickr,
    I tried to do it without changing Color to Strings but i was getting an error in the line temp.setBackground(Color.tempc);, so i decided to change it to String and retrieve it's value in the method.
    SSCCE for my code is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import java.lang.reflect.InvocationTargetException;
    <applet code="test" width=400 height=400>
    </applet>
    public class test extends JApplet
         JPanel t[][]=new JPanel[8][8];
         JPanel p[][];
         public void init()
         try{
         SwingUtilities.invokeAndWait(new Runnable()
              public void run()
                   t=makeGUI(8,8);
                   logic(t,8,8);
         }catch(InterruptedException e){e.printStackTrace();}
         catch(InvocationTargetException e){e.printStackTrace();}
    /* Board*/
    private JPanel[][] makeGUI(int rows, int cols)
        p = new JPanel[rows][cols];
        Container contentPane = getContentPane();
        contentPane.setLayout(new GridLayout(rows, cols));
        for (int i = 0; i < rows; i++)
          for (int j = 0; j < cols; j++)
            p[i][j] = new JPanel();
            contentPane.add(p[i][j]);
            if (i % 2 == j % 2)
              p[i][j].setBackground(Color.white);
              else
              p[i][j].setBackground(Color.darkGray);
         return p;
    private void logic(JPanel p[][], int rows, int cols)     
              for (int i = 0; i < rows; i++)
              for (int j = 0; j < cols; j++)
              final int k=i, l=j;
              p[i][j].addMouseListener(new MouseListener()
                   JPanel temp=null,m;
                   String tempc, m_color;
                   public void mouseClicked(MouseEvent me)
                        m=(JPanel)me.getComponent();
                        if(m!=temp)
                        m_color=m.getBackground().toString();     //retaining current background color
                        m.setBackground(Color.blue);
                        if(temp!=null)     // this method sets the panel
                             {               //     to its original color
                             temp.setBackground(Color.getColor(tempc));
                        tempc=m_color;     //color Strings
                        temp=m;          //JPanels
                   public void mouseEntered(MouseEvent me){}
                   public void mouseExited(MouseEvent me){}
                   public void mousePressed(MouseEvent me){}
                   public void mouseReleased(MouseEvent me){}
    }

  • How to change background color of row of a table in a panel table

    hi! im trouble right now, somebody help me. i have a matrix of row and column, panel row and panel table in jsp. my problem is how can i change the background color of a row once it clicked. i have row in table which have panel table with panel column and panel row.
    i have already work for it but i only change the background color once i clicked is the first row and first column then the rest row and column is not working..pls.. give me sample code for it..thnx a lot!!!
    Thnank's,
    froilet

    Ok! I have 2 jsp, the input jsp and display.jsp! Once i input value on input.jsp, it will display on display.jsp. I have also my javascript named updateBin.js. Now, how can i update each row once i clicked it... the succeeding rows and columns..hope u help me with this..here is my code:
    Display.jsp
    <html:html locale="true">
    <head>
         <html:base/><meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Strip Map Loader</title><script type="text/javascript" src="js/updateBin.js"></script>
    </head>
         <%      
              int intRow = Integer.parseInt(request.getParameter("intRows"));
              int intColumn = Integer.parseInt(request.getParameter("intColumns"));
              int intPanelRow = Integer.parseInt(request.getParameter("intPanelRows"));
              int intPanelColumn = Integer.parseInt(request.getParameter("intPanelColumns"));
         %>
    <BODY bgcolor="#33b9ec" leftmargin="50%">
         <b>Strip ID:  </b><font color="red" face="arial"><b><bean:write name="strStripID" scope="request" /></b></font>
         <br><br>
         <font size="3" face="tahoma"><b>Bins Updater Tool:</b></font>
         <table border="1" width="365px" bgcolor="#1ea6f7" height="15">
              <tr>
                   <td valign="top" align="center">
                        <table><tr><td><font size="2">Select Bin Type:</font></td>
                        <td><select id="binType" onchange="updateBin()" size="1">
                             <OPTION></OPTION>
                             <OPTION value="green">Good Bin</OPTION>
                             <OPTION value="red">Reject Bin</OPTION>
                        </select></td></tr></table>
                   </td>
    </tr>
    </table>
    <table id="tbl" align="center" border="1" cellspacing="3" cellpadding="5" bgcolor="#CC9900">
    <tr>
    <td>                                                  
         <%for (int pnlrows=1; pnlrows<=intPanelRow; pnlrows++){%>     
              <table id="table" width="100%" border="1" bgcolor="#CC9900" cellspacing="7" cellpadding="0" align="center">
              <tr>
              <%for(int pnlcols=0; pnlcols<intPanelColumn;pnlcols++){%>               
              <td>
                        <%for (int rows=1;rows<=intRow; rows++){%>                    
                        <table cellspacing="5" width="100px" align="center" bgcolor="#CC9900">
                        <tr>
                             <td>                    
                             <%for(int cols=1; cols<intColumn; cols++){%>
                             </td>     
                             <td id="col" bgcolor="#008000" align="center" ondblclick="changeCol()"> X </td>          
                             <%}%>
                             <td id="row" bgcolor="#008000" align="center" ondblclick="changeRow()"> X </td>
                             <td></td>     
                             <%}%>                                                  
                        </tr>
                        </table>
              <%}%>
              </td>
              </tr>
              </table>     
         <%}%>
    </td>
    </tr>
    </table>
    and this is my javascript code:
         function updateBin()
              var binType=document.getElementById("binType")
              if(binType.value == "green")
              [binType.selectedIndex].value
              //binType = changeR();
              //alert('Good Bin Selected');
              if(binType.value == "red")
              [binType.selectedIndex].value
              //binType = changeC();
              //alert('Reject Bin Selected');
              if(binType.value == "")
                   alert('Please select only on the category!')
         function changeRow()
              if(binType.value=="green")
              x=document.getElementById('row').style.background="green";     
              alert('Updated!')     
              if(binType.value=="red")
              x=document.getElementById('row').style.background="red";
              //alert('Reject Bin Updated!')
         function changeCol()
              if(binType.value=="green")
                   x=document.getElementById('col').style.background="green";     
                   alert('Updated!')     
              if(binType.value=="red")
              x=document.getElementById('col').style.background="red";
              //alert('Reject Bin Updated!')
    this code only updates the first row and column..but the succeeding panel row and panel column can't update...what will i do? theres something wrong in my javascript or in my jsp...pls help me......thanx.....in advance!!

  • Applet-Panel, background color and size problem

    I am writing an applet with simple form.
    Form is having 3 rows and 2 cols (label and textfield). Each row I want to display in different color. So I created each row with 2 separate panel (one for label and one for text field - of which I set the backgroung color).
    The total form is in one panel with grid layout (2 colmns).
    My problems are
    1)The space between label and text field (col width) can not be resized. I tried to use setSize but not giving any effect.
    2)Another problem is when I am seting the background color, the textfield is also changing the color (textfield I want to white color only). This does not have any effect on Choice
    3)The first label I wanted to use simple break but could not. I tried \n\t, \n, chr(13) + chr(10) etc but not getting any result so created separate panel.
    My code goes here:
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class test1 extends Applet{
    protected TextField refnoTextField=null, payerTextField=null, amtTextField=null;
    protected Choice typeChoice;
    public void init() {
         /* The mainPanel layouts components with BorderLayout manager
              which will hold form and button panel */
         Panel mainPanel = new Panel(new BorderLayout());
         Panel taxformPanel=new Panel(new GridLayout(3,2));
         Label l;
         //panel for tax ref no label
         Panel refnoLabelMainPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
    //here wanted to use simple line break but \n\t does not seems to work not even chr (10), chr(13)
    //so created separate panel (Payment Voucher Or \n\t Reference no.
         Panel refnoLabelPanel = new Panel(new GridLayout(2,1));
         l = new Label("Payment Voucher Or");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         refnoLabelPanel.add (l);
         l = new Label("Tax Reference No:");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         refnoLabelPanel.add (l);
         refnoLabelMainPanel.add(refnoLabelPanel);
         refnoLabelMainPanel.setBackground(Color.blue);
         //panel for tax ref no text field
         Panel refnoTextFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         refnoTextField = new TextField(20);
         refnoTextFieldPanel.add(refnoTextField);
         refnoTextFieldPanel.setBackground(Color.blue);
         //panel for tax type label
         Panel typeLabelPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         l = new Label("Tax Type:");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         typeLabelPanel.add (l);
         typeLabelPanel.setBackground(Color.yellow);
         //panel for tax type choice
         Panel typeChoicePanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         typeChoice = new Choice();
         typeChoice.add("Personal Tax");
         typeChoice.add("Income Tax");
         typeChoicePanel.add(typeChoice);
         typeChoicePanel.setBackground(Color.yellow);     
         //panel for tax payers name label
         Panel payerLabelPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         l = new Label("Tax Payer's Name:");
    l.setFont(new Font("Helvetica", Font.BOLD,10));
         payerLabelPanel.add (l);
         payerLabelPanel.setBackground(Color.blue);
         //panel for tax payer field
         Panel payerTextFieldMainPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
         Panel payerTextFieldPanel = new Panel(new GridLayout(2,1));
         payerTextField = new TextField(20);
         payerTextFieldPanel.add(payerTextField);
         l = new Label(" (as per NRIC or Passport)");
    l.setFont(new Font("Helvetica", Font.BOLD,8));
         payerTextFieldPanel.add (l);
         payerTextFieldMainPanel.add(payerTextFieldPanel);
         payerTextFieldMainPanel.setBackground(Color.blue);
         taxformPanel.add(refnoLabelMainPanel);
         taxformPanel.add(refnoTextFieldPanel);
         taxformPanel.add(typeLabelPanel);
         taxformPanel.add(typeChoicePanel);
         taxformPanel.add(payerLabelPanel);
         taxformPanel.add(payerTextFieldMainPanel);
         /* buttonPanel to hold all buttons */
         Panel buttonPanel = new Panel();
         buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
         Button continueButton = new Button("Continue");
         continueButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                        continueButtonAction();
         Button clearButton = new Button("Clear");
         clearButton.addActionListener(new ActionListener()     {
              public void actionPerformed(ActionEvent e)     {
                   clearButtonAction();
         Button cancelButton = new Button("Cancel");
         cancelButton.addActionListener(new ActionListener()     {
              public void actionPerformed(ActionEvent e)     {
                   cancelButtonAction();
         buttonPanel.add(continueButton);
         buttonPanel.add(clearButton);
         buttonPanel.add(cancelButton);
         mainPanel.add("Center", taxformPanel);
         mainPanel.add("South", buttonPanel);
         add(mainPanel);
    } // public void init()     
    public void continueButtonAction() {
         MessageDialog d=new MessageDialog("Confirm","Continue? ",true, 430, 150);
         System.out.println ("Continue Button Pressed");
    }//continueButtonAction
    public void clearButtonAction()     {
         System.out.println ("Reset Button Pressed");
    }//clearButtonAction
    public void cancelButtonAction()     {
         MessageDialog d=new MessageDialog("Confirm","Cancel Button ? ",true, 430, 150);
         System.out.println ("Cancel Button Pressed");
    } // cancelButtonAction
    } // TaxPaymentApplet3
    Please help,
    manisha

    I do not want to go into detail, but there are some hints you can follow.
    I am talking about AWT, not swing, you should decide which one you will use and don't mix the two of them.
    If you want to run your applet in current browsers without requiring the java plugin, you should be aware, that most browsers support old versions of java and many convenient methods and classes are missing :-(
    So
    You can change the size of a label by putting it in a panel ( labelPanel ), whose layout is set to FlowLayout. Then you put in labelPanel another empty panel ( emptyPanel ), whose layout is set to null, and you set the width of the empty panel to whatever you want ( this is the gap between the label and the next component ), an the height to the least nonsero number possible, i.e. 1. Well, you can add to the labelPanel more components, if you wish. So, when you want a gap, use an empty panel with a fixed size.
    You cannot use line break in a label. You should place more labels in a panel instead. I am not sure if the direction of FlowLayout can be set to vertical, but very probably it can. If so, that is your solution. If not - see what other layout managers you have available, but make sure your choice belongs to java.awt ! BorderLayout allows you to use up to three labels (=> 3 lines). And if nothing fits your needs, ... write a layout manager.
    Well, hope I could help.

  • How do I restore the Colors in the Finder side panel?

    Hello;
    How do I restore the colors to the Finder's Side Panel?

    Is this what you're wanting to do?
    The icons and how-to are from this website: Replace Lion's Monochromatic Finder Icons with Old-School Colorful Ones. Works with Mt. Lion as the screenshot shows.
    OT

  • Override Panel background color

    Hello
    I am using an Adobe theme (GraphiteGraphical). It is a little too dark for my Panel containers. I would like to adjust the background color.
    I am able to adjust the Application's background-Color in the CSS file like so:
    s|Application {
        padding-top: 10;
        padding-bottom: 10;
        padding-left: 10;
        padding-right: 10;
        vertical-gap: 4;
        background-color: #CCCCCC;
    I am unable to do this for my Panels. Why? And how can I accomplish this?
    I need my Panel backgrounds to be the same as the Application's. Right now they are way too dark. Help?

    Hello
    Thank you Subeesh!
    I have tried this already, it was already in my styles.css file. It did not work. Also, I am not using spark panels but MX panels. Ive tried both, no luck.
    I do not understand why only my Login screen changes background color when I change thr background color in the Application CSS tag, but nothing else does?
    It is like the theme is overriding everything that is not Application CSS specific?
    How can I modify the CSS definition for the Graphite theme? It's too dark and the end users are not happy. Help!
    this does not work, the theme overrides this:
    s|Panel
            backgroundColor:#CCCCCC;

  • Unable to Edit CSS style panel to change Wiget background colors

    Hello my name is Gabriel and Im designing a website using the Sprymenu Bar: Menu Bar 1 that I found on the adobie free template 1.
    I was able to edit the spry menu bar to drop down sub menu's but I was curious hoy to bring up the CSS Style panel so I can change the colors of this Spry Menu bar. How do I bring up the CSS style panel? Could you point me to a color menu so I could change the Colors?

    Hi,
    they work with an background-image, look for example here (it's from widgets of this
    http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html):
    #MenuBar6 a.MenuBarItemSubmenu {
    background-image: url(images/star.gif);
    background-position: 5% 50%;
    #MenuBar6 a.MenuBarItemSubmenuHover {
    background-image: url(images/star-hover.gif);
    background-position: 5% 50%;
    background-color: #FF0;
    color: #F00;
    Hans-G.

  • How to change front panel indicator properties such as background color or enable/disable programmatically?

    Is it possible to change the properties of a front panel indicator such as background color or to change from enabled to disabled-grayed out programatically in response to limit conditions or a time-out?

    "Disabled" means that the control/indicator will not respond to a user operation. However, the displayed data can still change. What you want to do can be easily achieved using a case structure : wire your boolean to the case input, and put your indicator in the "True" case condition. That way, it will be updated only when the digital input is set to true.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • "lights out" effect on side panels?

    On my system, "lights out" cycles the color of the background of the center panel, but has no effect on the appearance of the side panels. Is this normal behavior?

    >On my system, "lights out" cycles the color of the background of the center panel, but has no effect on the appearance of the side panels. Is this normal behavior?
    I've seen the same behavior on a dual-monitor configuration. Is that what you are running?
    I run LR on my large display, with Windows desktop on a smaller display. I've seen some strange behavior that wasn't present in LR 1.0, but haven't had time to pin it all down yet. Regarding your question, if I move LR to the smaller display (i.e., like a one-monitor configuration) it works fine. Unfortunate....this all worked fine in LR 1.0.

  • Alert Control - Background Color

    Hi everybody,
    I've been trying to change the background color of the Alert
    Control.
    The only thing that I got close to, what using the
    myAlert.setStyle("backgroundColor",......). However, it only
    changed the
    inner background, not the background of the main Alert. Can
    somebody point
    me in the right direction?
    Thanks,
    JG

    Well, that was actually quite simple. I was exploring the
    classes and their
    parents, it was getting a little confusing. Then I started
    inspecting the
    Alert box created. I noticed I has getting 3 children being
    created:
    [INFO] Alert6.border (object):
    [INFO] Alert6.UIComponent8 (object):
    [INFO] Alert6.AlertForm14 (object):
    so I started looking at the border class, then programmatic
    skin etc... Long
    story short, I went back to the doc on the Alert control,
    there are actually
    several styles related to border, it's quite misleading
    because it actually
    related to this 20 pixel edge around the content of the
    alert. So with a
    combination of border styles and background styles you can
    actually get your
    control to look the way you want. Here is my code:
    var myAlert:Alert = Alert.show("An error occured while
    loading from the
    server.", "Error", Alert.YES, this);
    myAlert.setStyle("borderColor", "#75734f");
    myAlert.setStyle("backgroundColor", "#75734f");
    And actually, from the doc:
    BorderAlpha - Alpha of the title bar, control bar and sides
    of the Panel.
    just need to take time to read the doc sometimes.... ;-)
    "phi2265" <[email protected]> wrote in
    message
    news:erkr54$60r$[email protected]..
    > have you figured this out yet? you can't call
    AlertMsg.parent.setStyle
    > like you can AlertMsg.setStyle

  • JButton background color question

    Hi everybody,
    I have a feeling I'm going to get slammed for this, but I have to ask a very general question and hope for an answer.
    I have a JDialog on which buttons don't seem to hold their background color. That is, when I use setBackground, the only color change I get is a very thin outline of the color, and the rest of the button is white. The strange thing about the button is that the white center actually seems transparent--if I change the panel the button is on to another color besides white, the center of the button turns that color.
    I've tried to solve this problem with setOpaque( true ), setContentAreaFilled( true ), setBackground( color ), setForeground( color ), and I'm pretty sure every combination of those.
    Unfortunately, I haven't been able to reproduce this in a test case, so I can't give a SSCCE, although I've tried for a while now to make one.
    So...has anyone ever run into a problem like this and can give me some advice? I'm sorry I can't be more specific, if anyone has a question I'll do my best to answer.
    Thanks,
    Jezzica85

    I have a feeling I'm going to get slammed for this, but I have to ask a very general question and hope for an answer.Why would people be harsh on you? The only risk you take is: vague question => vague answer (or random).
    So...has anyone ever run into a problem like this and can give me some advice? I'm sorry I can't be more specific, if anyone has a question I'll do my best to answer.Never seen that myself, so I'll add a few random questions/thoughts:
    I have a JDialog on which buttons don't seem to hold their background color. That is, when I use setBackground, the only color change I get is a very thin outline of the color, and the rest of the button is white.- are you using a custom JButton subclass? If yes are you certain the subclass does not override paintComponent()?
    - If not, the button is painted by its ButtonUI. Can you tell which UI class is used (sysout(+theButton.getUI()+)?
    The UI is set according to the LookAndFeel.
    - Do you set any special LookAndFeel (+UIManager.setLookAndFeel(...)+, or look and feel's UIDefault properties in your app (generally that is done at startup)?
    - If not, can you tell the current look and feel when you bring up the dialog (+UIManager.getLookAndFeel(...)+, although that can be inferred from the ButtonUI subclass' name.
    I've tried to solve this problem with setOpaque( true ), setContentAreaFilled( true ), setBackground( color ), setForeground( color ), and I'm pretty sure every combination of those.FYI, the ButtonUI paints the button however it sees fit; in particular it doesn't have to respect the colors, opacity, filling... properties.
    Eventually:
    - are you using a custom JDialog subclass (probably, as that's generally how people write dialogs; not the best way IMHO, but there are cases where this is hard to avoid).
    I see you can't provide an SSCCE right ow, but maybe you can try to narrow the list of suspects in your side?
    - Do you reproduce the same problem at startup, if you bring the JDialog up as soon as possible?
    - Do you reproduce the problem with a mere JOPtionpane.showMessageDialog(..., theButton,...)?
    - Do you reproduce the problem outside of the JDialog context (I see you mention using a different JPanel, but is that in the dialog or somewhere else?
    Good luck with your investigations.
    Edited by: jduprez on Sep 30, 2009 8:20 AM

  • How to give Common Background color for all JPanels in My Swing application

    Hi All,
    I am developing a swing application using The Swing Application Framework(SAF)(JSR 296). I this application i have multiple JPanel's embedded in a JTabbedPane. In this way i have three JTabbedPane embedded in a JFrame.
    Now is there any way to set a common background color for the all the JPanel's available in the application??
    I have tried using UIManager.put("Panel.background",new Color.PINK);. But it did not work.
    Also let me know if SAF has some inbuilt method or way to do this.
    Your inputs are valuable.
    Thanks in Advance,
    Nishanth.C

    It is not the fault of NetBeans' GUI builder, JPanels are opaque by default, I mean whether you use Netbeans or not.Thank you!
    I stand corrected (which is short for +"I jumped red-eyed on my feet and rushed to create an SSCCE to demonstrate that JPanels are... mmm... oh well, they are opaque by default... ;-[]"+)
    NetBeans's definitely innocent then, and indeed using it would be an advantage (ctrl-click all JPanels in a form and edit the common opaque property to false) over manually coding
    To handle this it would be better idea to make a subclass of JPanel and override isOpaque() to return false. Then use this 'Trasparent Panel' for all the panels where ever transparency is required.I beg to differ. From a design standpoint, I'd find it terrible (in the pejorative sense of the word) to design a subclass to inconsistently override a getter whereas the standard API already exposes the property (both get and set) for what it's meant: specify whether the panel is opaque.
    Leveraging this subclass would mean changing all lines where a would-be-transparent JPanel is currently instantiated, and instantiate the subclass instead.
    If you're editing all such lines anyway, you might as well change the explicit new JPanel() for a call to a factory method createTransparentJPanel(); this latter could, at the programmer's discretion, implement transparency whichever way makes the programmer's life easier (subclass if he pleases, although that makes me shudder, or simply call thePanel.setOpaque(false) before returning the panel). That way the "transparency" code is centralized in a single easy to maintain location.
    I had to read the code for that latter's UI classes to find out the keys to use (+Panel.background+, Label.foreground, etc.), as I happened to not find this info in an authoritative document - I see that you seem to know thoses keys, may I ask you where you got them from?
    One of best utilities I got from this forum, written by camickr makes getting these keys and their values very easy. You can get it from his blog [(->link)|http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/]
    Definitely. I bit a pair of knucles off when discovered it monthes after cumbersomely traversing the BasicL&F code...
    Still, it is a matter-of-fact approach (and this time I don't mean that to sound pejorative), that works if you can test the result for a given JDK version and L&F, but doesn't guarantee that these keys are there to stand - an observation, but not a specification.
    Thanks TBM for highlighting this blog entry, that's the best keys list device I have found so far, but the questions still holds as to what specifies the keys.
    Edited by: jduprez on Feb 15, 2010 10:07 AM

  • Changing font and background color for all components

    Hi,
    This is my first time writing a GUI, and I'm pretty new to Swing and Java. I just recently switched from C++, and so far Java seems to be doing a nice job =)
    Currently I have a gazilion components (textfields, labels, panels) and I'm wondering if there is a way to change their background/foreground colours without adding in setBackground/setForeground for every single component.
    I've done some researching onto using Look and Feel, but there aren't any current ones that suits my needs. And everyone seems to mention that programming your own is pretty complicated.
    My boss wants a slick white text on black background interface, so you can imagine that he's not very impressed with the current default greyish colours =)
    Thank you for any help!
    Cindy

    Hi Cindy,
    I'm not sure how effective a solution this will be, but you could try:UIManager.put("TextField.background", Color.BLACK); // Default text field background becomes blackThere are many more defaults you'd have to change and could probably achieve it more reliably and simply by creating or editing the properties file that controls the way the look and feel (even if it's the default) is implemented. Take a look at:
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/UIManager.htmlHope this is helpful
    Chris.

Maybe you are looking for