How to get background color of controls ?

Hello everyone.
How to get background color of controls ?
When we use AWT/Swing,
we can get background color of component by using Component.getBackground()
It is regret that I can not find any method for such a method in JavaFX.
And how do we detect the change of background color of controls ?
Best regards.

Hi Tadashi,
try this.
@Override
public void start(final Stage primaryStage) {
    primaryStage.setTitle("Test ChangeListener");
    Button btn = new Button();
    btn.setText("change background");
    btn.setOnAction(new EventHandler<ActionEvent>() {
        @Override
        public void handle(ActionEvent event) {
            primaryStage.getScene().setFill(Color.rgb(
                    (int)(Math.random() * 255),
                    (int)(Math.random() * 255),
                    (int)(Math.random() * 255)));
    StackPane root = new StackPane();
    root.getChildren().add(btn);
    primaryStage.setScene(new Scene(root, 300, 250));
    primaryStage.getScene().fillProperty().addListener(new ChangeListener<Paint>() {
        @Override
        public void changed(ObservableValue<? extends Paint> arg0, Paint arg1, Paint arg2) {
            System.out.println(
                    "old color: " + arg1.toString()
                    + ", new color: " + arg2.toString());
    btn.getOnAction().handle(null);
    primaryStage.show();
}Peter

Similar Messages

  • How to get background color in MVC programming

    Hi Experts,
    I am new to BSP.
    I am working in CRM 7.0 version and designing a view using MVC method in BSP.
    I have two doubts::
    1. How can i get background color in a view ?
    2. How can i attach a picture, that is in paint-brush, in background ?
    Thanks in Advance.
    Nitin Karamchandani.
    Edited by: Nitin Karamchandani on Jun 3, 2009 8:10 AM

    Hi,
    several html tags have the attribute bgcolor, like
    <body bgcolor="red">  or <body bgcolor="RRGGBB">  where RR, GG, BB is an hexadecimal value according to RGB color palette.
    you can also work with CSS and in this case you affect the attribute style, which is also available in several tags:
    document.body.style.backgroundColor="#EEEEEE"

  • FrameMaker10 - Windows 7 - How to get background color for a paragraph tag?

    I am trying to create my heading1 with a background like the picture above.
    I have put the blue background on a master page, but the body frame goes into the blue background and subsequently the blue background does not show through.
    Any ideas?
    Thanks,
    Cindy

    I can't test this right now, but I remember that when extracting a TOC, table title paragraphs appear out of order when mixed with main-text-flow paragraphs, because of the way that FM keeps track of table information. I'm not sure if the problem also affects paragraphs in table cells.
    Colors behind text is a frequent request. It's always a good idea to post a formal feature request here: Wishform. Eventually user requested features have been known to appear in future FM releases.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices
    Arnis Gubins wrote:
    Cindy, I missed the fact that you're title is centred in the block. You could use a single-cell table construct to hold the contents for the title and have the title paratag set to be in the middle of the cell. (you could also colour the cell and skip colouring on the Master page).
    There are always multiple ways to do things in FM, that's why it sometimes seem so hard to use...

  • How to change background color in online editor

    How to change background color in online editor

    Jeff,
    if you try to change all the plsql keywords to the same background color (that is not either white or black or blue) via the options panel in SQL Developer (Code Editor > PLSQL syntax colors), you will get the new background color in the worksheet only for the areas with plsql text, while the areas without any text will have the same background color as the base color scheme you started with. This means that there is no way to change the "general background" color via the options panel, but you have to use the same background color of one of the predefined color schemes.
    This seems to me a bug, but probably it's not considered high priority, so it will not be fixed for the time being.
    I would like to stress the fact that being able to change the color scheme of the development environment that you use every day about 8 hours a day can make quite a difference on your eyes at the end of the day.
    Thanks,
    Paolo

  • How to change background color of multilevel textbox in oracle form 6i

    hi
    How To Change background Color of the Text.
    In One Multilevel Block 10 Record is Display At a Time in a Text Box (Name is AMTt)
    This Text Box display , Buffer and Record Length is 10
    In Case Of Amount is Less 500 then Text Color Is Red(Or Any) and In Case Amount Is More 500 Then Color is Green (Or Any).
    Me Use This Code in PRE_RECORD EVENT
    TCMTL is Block name
    TCMTL_AMT is Text Box Name
    if :TCMTL.TCMTL_AMT >5000 then
         g_fun.msgbox('Values is more');
         Set_Item_Property('TCMTL_AMT' , BACKGROUND_COLOR, 'r50g100b100');
    else
         g_fun.msgbox('Values is Less');
         Set_Item_Property('TCMTL_AMT' , BACKGROUND_COLOR, 'r50g100b10');
    end if;     
    but This Code Is Refer Only 10th Value and change color depend on value.
    so
    possible to Different color in One Block Text Box Then how?

    DECLARE
         cur_itm VARCHAR2(80);
         cur_block VARCHAR2(80) := Name_in('system.trigger_block') ;
         BEGIN
         cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
              cur_itm := cur_block||'.'||cur_itm;
              --:global.VISUAL_ATTRIBUTE:= 'BACKGROUND_COLOR';
              --:global.VISUAL_ATTRIBUTE:= get_item_property(cur_block||'.'||cur_itm ,Background_Color);
              IF :TCMTL.TCMTL_AMT >= 500 THEN
                             Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'r50g100b100');
                   ELSE
                             Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'r5g100b10');
                   END IF;
                             cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
                   END LOOP;
                   next_record;
    END;
    this is my in that how to set a VISUAL_ATTRIBUTE, and where to set so get a background color of text and change

  • How to get default color of a selected row in a JLIst

    I have a JList that I am changing the font color for based on a certian situation so I created my own MyCellRenderer to do this. However, when I select an item in the list the row is no longer highlighted. I used the isSelected method to determine if a row was selected and then change the background color of that row. However, I would like the color to be the default color that you get when you select a row in a default JList. I can't seem to figure out how to get that color. How do I obtain what that color is? I found an example where you can get the default color for the background of a button and use that color so I would guess it is something similar to that. My code is below so I hope someone can tell me how to get that color that I want.
    Thanks...Chris
    class MyCellRenderer extends JLabel implements ListCellRenderer {
         public MyCellRenderer() {
              setOpaque(true);
         public Component getListCellRendererComponent(
             JList list,
             Object value,
             int index,
             boolean isSelected,
             boolean cellHasFocus)
             int index1 = value.toString().indexOf("-");
               String errors = value.toString().substring(index1 + 1, index1 + 6).trim();
             int numErrors = Integer.parseInt(errors);
               if (numErrors > 0)
                      setForeground(Color.red);
                      setBackground(Color.white);          
             else
                  setBackground(Color.white);
                  setForeground(Color.black);
             if(isSelected)
                  //ColorUIResource col = (ColorUIResource)UIManager.getDefaults().get("JButton.background");
                  ColorUIResource col = (ColorUIResource)UIManager.getDefaults().get("Button.background");
                  setBackground(col);
             setText(value.toString());
             return this;
    }

    Swing related questions should be posted in the Swing forum.
    I would like the color to be the default color that you get when you select a row in a default JList. I can't seem to figure out how to get that colorlist.getSelectionBackground();

  • How to add background color in JFrame

    I have three classes, Car, CarComponent, and CarViewer. I don't know how to code background color. Do I add it to CarViewer where the JFrame is or CarComponent?
    CarViewer:
    import javax.swing.JFrame;
    public class CarViewer
       public static void main(String[] args)
          JFrame frame = new JFrame();
          frame.setSize(300, 400);
          frame.setTitle("Two cars");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          CarComponent component = new CarComponent();
          frame.add(component);
          frame.setVisible(true);
    }CarComponent
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import javax.swing.JComponent;
       This component draws two car shapes.
    public class CarComponent extends JComponent
       public void paintComponent(Graphics g)
          Graphics2D g2 = (Graphics2D) g;
          Car car1 = new Car(0, 0);
          int x = getWidth() - 60;
          int y = getHeight() - 30;
          Car car2 = new Car(x, y);
          car1.draw(g2);
          car2.draw(g2);     
    }

    What JSG said, plus I really don't think it's a good idea to instantiate new Car objects in a paintComponent override. Painting methods should be restricted to painting activities, as a matter of principle.
    One alternative is to construct your Car instances in a separate method and call repaint() when done; another is to provide a Car method say moveTo(int x, int y) OR refactor the draw(Graphics g) method of Car to draw(Graphics g, int x, int y). Both these suggest that you maintain the Car references as instance fields of CarViewer.
    In future (not this time), Swing related questions should be posted in the [Swing forum|http://forums.sun.com/forum.jspa?forumID=57]
    db

  • How to set background color in row of JTable ?

    i am new in java please tell me about How to set background color in row of JTable ? please example code. Thnak you.

    Here is an example: http://www.javaworld.com/javaworld/javaqa/2001-09/03-qa-0928-jtable.html
    For more info on how to use tables read the swing tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    ICE

  • How to set background color in af:inputText in an af:table

    Hi,
    how to set background color in af:inputText in an af:table depending on the value of af:inputText.
    For example, how to set background red if the af:inpuText is empty
    Thanks

    Hello Pavo,
    it's also possible to take the code from ebitar and use the expression within styleClass instead of inlineStyle.
    E.g. you can define a custom style "StyleClassEmptyText" in your skin and set this styleclass if af:inputtext is empty.
    By using style classes you can have the same style in the whole application and you are able to change this style on a single point(in the styleclass) for the whole application.
    br
    Peter

  • How to change background color in photoshop cs3

    how to change background color in photoshop cs3
    Please help me...

    Background for what? You need to explain better and be more specific.
    Mylenium

  • How to set background color for selected days in DateChooser

    How to set background color for selected days. I created
    checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
    DateChooser, I want to change the background color for the selected
    day when i click on a button after selecting the desired checkboxs
    [ monthly wise/yearly wise]
    Thanks in advance

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • How to download background color of ALV with button "Export to Excel"

    Dear Experts:
    I can download the data of ALV in webdynpro for ABAP, but the color is missing.
    Does anybody know how to download background color of the ALV cells also by "Export to Excel" button?
    Could anybody help on this?
    Thanks in advance!
    Best Regards
    Lingxing Meng

    never experienced that...
    [chk this link|Download colored ALV output in to EXCEL sheet;
    a couple of intersting posts, they talk abt general ALV...
    try one of the last post ...when downloading
    use local file->HTML only.. but while choosing the file location to save give extension as XLS.

  • How to enable background color printing?

    how to enable background color printing?

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • How to set background color for a JFrame

    Hi,
    i am new to swing programming. I have created a JFrame called framehelp and i placed some labels in the frame.
    I have set the background color as yellow for the frame ie by setBackground(new java.awt.Color(255, 255, 204));
    But after compiling the program i am still getting the background color of frame as gray.
    How can i change the background color of frame as lightish yellow.
    I have used NETBEANS to generate this code and i am posting the code..
    Kindly help me
    Thanks in adavance
    public class framehelp extends javax.swing.JFrame {
        /** Creates new form framehelp */
        public framehelp() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            jLabel3 = new javax.swing.JLabel();
            jLabel4 = new javax.swing.JLabel();
            jLabel5 = new javax.swing.JLabel();
            jLabel6 = new javax.swing.JLabel();
            jLabel8 = new javax.swing.JLabel();
            jLabel9 = new javax.swing.JLabel();
            jLabel10 = new javax.swing.JLabel();
            jLabel11 = new javax.swing.JLabel();
            jLabel12 = new javax.swing.JLabel();
            jLabel13 = new javax.swing.JLabel();
            jLabel7 = new javax.swing.JLabel();
            jLabel14 = new javax.swing.JLabel();
            jLabel15 = new javax.swing.JLabel();
            jLabel16 = new javax.swing.JLabel();
            jLabel17 = new javax.swing.JLabel();
            jLabel18 = new javax.swing.JLabel();
            jLabel19 = new javax.swing.JLabel();
            jLabel20 = new javax.swing.JLabel();
            jLabel21 = new javax.swing.JLabel();
            jLabel22 = new javax.swing.JLabel();
            jLabel23 = new javax.swing.JLabel();
            jLabel24 = new javax.swing.JLabel();
            jLabel25 = new javax.swing.JLabel();
            jLabel26 = new javax.swing.JLabel();
            jLabel27 = new javax.swing.JLabel();
            jLabel28 = new javax.swing.JLabel();
            jLabel29 = new javax.swing.JLabel();
            jLabel30 = new javax.swing.JLabel();
            jLabel31 = new javax.swing.JLabel();
            jLabel32 = new javax.swing.JLabel();
            jLabel33 = new javax.swing.JLabel();
            getContentPane().setLayout(null);
            setBackground(new java.awt.Color(255, 255, 204));
            setForeground(new java.awt.Color(204, 204, 204));
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jLabel1.setText("The CAME framework software measurement process evaluation is used to determine the Level of  measurement in the ITarea. This measurementprocess evaluation is ");
            getContentPane().add(jLabel1);
            jLabel1.setBounds(40, 50, 41, 16);
            jLabel2.setText("performed individually for software coomponents ie SoftwareProduct, SoftwareProcess and SoftwareResource.");
            getContentPane().add(jLabel2);
            jLabel2.setBounds(40, 70, 41, 16);
            jLabel3.setText("Below we describe the steps which will guide through the measurement process evaluation. There are two types of evaluation considerd here, General evaluation");
            getContentPane().add(jLabel3);
            jLabel3.setBounds(40, 100, 913, 16);
            jLabel4.setText("and Evaluation with respect to a standard. The measurement intensions considerd by varoius measurement standards will be used in our tool based method.  ");
            getContentPane().add(jLabel4);
            jLabel4.setBounds(40, 120, 893, 16);
            jLabel5.setText("Information about the measurement standards can be found at     www.iso.org ,    www.ieee.org.");
            getContentPane().add(jLabel5);
            jLabel5.setBounds(40, 140, 542, 16);
            jLabel6.setText("Steps to calculate the MetricsLevel");
            getContentPane().add(jLabel6);
            jLabel6.setBounds(40, 190, 199, 16);
            jLabel8.setText("2 )  The opened frame consists of several  metrics and measures, evaluation level buttons, result textfields and selection choice lists. To calculate");
            getContentPane().add(jLabel8);
            jLabel8.setBounds(70, 240, 41, 16);
            jLabel9.setText("general Metricslevel without any standard, select general from Measurement standard choice list. then select Both from scaleType choice list and finally select metrics ");
            getContentPane().add(jLabel9);
            jLabel9.setBounds(90, 260, 949, 16);
            jLabel10.setText(" and measures from the frame and press MetricsLevel Button. The metricslevel for the selected metrics will be displayed in textfield1.");
            getContentPane().add(jLabel10);
            jLabel10.setBounds(90, 280, 756, 16);
            jLabel11.setText("3 ) To determine MetricsLevel with respect to a standard select a standard from MeasurementStandard choice list, select Both from ScaleType choice list and finally ");
            getContentPane().add(jLabel11);
            jLabel11.setBounds(70, 300, 933, 16);
            jLabel12.setText("select darkened metrics and measures and press MetricsLevel Button. The Metrics Level for the selected Metrics and standard will be diplayed in textfield1.");
            getContentPane().add(jLabel12);
            jLabel12.setBounds(90, 320, 883, 16);
            jLabel13.setText("4 ) Repeat steps 1 2, 3  for ProcessMeasurementEvaluation and ResourceMeasurementEvaluation menu items from the select menu.");
            getContentPane().add(jLabel13);
            jLabel13.setBounds(70, 340, 751, 16);
            jLabel7.setText("1 ) Select ProductMeasurementEvaluation menu item from the select menu,a frame called CAME framework software product measurement evaluation will be opened. ");
            getContentPane().add(jLabel7);
            jLabel7.setBounds(70, 220, 946, 16);
            jLabel14.setText("Steps to calculate MeasurementLevel");
            getContentPane().add(jLabel14);
            jLabel14.setBounds(50, 390, 214, 16);
            jLabel15.setText("1 ) Select ProductMeasurementEvaluation menu item from the select menu,a frame called CAME framework software product measurement evaluation will be opened.");
            getContentPane().add(jLabel15);
            jLabel15.setBounds(80, 420, 943, 16);
            jLabel16.setText("2 ) The opened frame consists of several  metrics and measures, evaluation level buttons, result textfields and selection choice lists. To calculate");
            getContentPane().add(jLabel16);
            jLabel16.setBounds(80, 450, 822, 16);
            jLabel17.setText("general Measurementlevel without any standard, select general from Measurement standard choice list. then select Quantitative measures from scaleType choice list ");
            getContentPane().add(jLabel17);
            jLabel17.setBounds(100, 470, 943, 16);
            jLabel18.setText("and finally select metrics and measures from the frame and press MeasurementLevel Button. The MeasurementLevel for the selected metrics will be displayed in textfield2.");
            getContentPane().add(jLabel18);
            jLabel18.setBounds(100, 490, 973, 20);
            jLabel19.setText("3 ) To determine MeasurementLevel with respect to a standard select a standard from MeasurementStandard choice list, select Quantitative measures from ScaleType choice list");
            getContentPane().add(jLabel19);
            jLabel19.setBounds(80, 510, 1009, 16);
            jLabel20.setText("and finally select darkened metrics and measures and press MeasurementLevel Button. The MeasurementLevel  will be diplayed in textfield2.");
            getContentPane().add(jLabel20);
            jLabel20.setBounds(100, 530, 799, 16);
            jLabel21.setText("4 )Repeat steps 1 2, 3  for ProcessMeasurementEvaluation and ResourceMeasurementEvaluation menu items from the select menu.");
            getContentPane().add(jLabel21);
            jLabel21.setBounds(80, 550, 748, 16);
            jLabel22.setText("Steps to calculate MeasurementProcessLevel");
            getContentPane().add(jLabel22);
            jLabel22.setBounds(50, 600, 262, 16);
            jLabel23.setText("1 ) Select ProductMeasurementEvaluation menu item from the select menu,a frame called CAME framework software product measurement evaluation will be opened.");
            getContentPane().add(jLabel23);
            jLabel23.setBounds(80, 630, 943, 16);
            jLabel24.setText("2 )The opened frame consists of several  metrics and measures, evaluation level buttons, result textfields and selection choice lists. To calculate");
            getContentPane().add(jLabel24);
            jLabel24.setBounds(80, 650, 819, 16);
            jLabel25.setText("general MeasurementProcesslevel without any standard, select general from Measurement standard choice list. then select Quantitative measures from scaleType ");
            getContentPane().add(jLabel25);
            jLabel25.setBounds(100, 670, 930, 16);
            jLabel26.setText("choice list, enter migrated metrics if any in textfield  below migrated metrics label and finally select metrics measures from the frame and press ");
            getContentPane().add(jLabel26);
            jLabel26.setBounds(100, 690, 818, 16);
            jLabel27.setText("MeasurementProcessLevel Button. The MeasurementProcessLevel for the selected metrics will be displayed in textfield3.");
            getContentPane().add(jLabel27);
            jLabel27.setBounds(100, 710, 691, 16);
            jLabel28.setText("3 ) To determine MeasurementProcessLevel with respect to a standard select a standard from MeasurementStandard choice list, select Quantitative measures from ");
            getContentPane().add(jLabel28);
            jLabel28.setBounds(80, 740, 937, 16);
            jLabel29.setText("from ScaleType choice list, enter migrated metrics if any in textfield below migrated metrics and finally select darkened metrics and measures and press  ");
            getContentPane().add(jLabel29);
            jLabel29.setBounds(100, 760, 873, 16);
            jLabel30.setText("MeasurementProcessLevel Button. The MeasurementprocessLevel for the selected metrics will be displayed in textfield3");
            getContentPane().add(jLabel30);
            jLabel30.setBounds(100, 780, 687, 16);
            jLabel31.setText("4 ) Repeat steps 1,2,3 for ProcessMeasurementEvaluation and ResourceMeasurementEvaluation menuitems.");
            getContentPane().add(jLabel31);
            jLabel31.setBounds(80, 800, 618, 16);
            jLabel32.setText("Steps to calculate MeasuredSoftwareProcessLevl");
            getContentPane().add(jLabel32);
            jLabel32.setBounds(60, 830, 285, 16);
            jLabel33.setText("1 ) Follow the same steps as MetricsLevel calcualtion but select metrics and measures covered by CAME Tools only.");
            getContentPane().add(jLabel33);
            jLabel33.setBounds(90, 860, 657, 16);
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-1100)/2, (screenSize.height-940)/2, 1100, 940);
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            new framehelp().show();
        // Variables declaration - do not modify
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel10;
        private javax.swing.JLabel jLabel11;
        private javax.swing.JLabel jLabel12;
        private javax.swing.JLabel jLabel13;
        private javax.swing.JLabel jLabel14;
        private javax.swing.JLabel jLabel15;
        private javax.swing.JLabel jLabel16;
        private javax.swing.JLabel jLabel17;
        private javax.swing.JLabel jLabel18;
        private javax.swing.JLabel jLabel19;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel20;
        private javax.swing.JLabel jLabel21;
        private javax.swing.JLabel jLabel22;
        private javax.swing.JLabel jLabel23;
        private javax.swing.JLabel jLabel24;
        private javax.swing.JLabel jLabel25;
        private javax.swing.JLabel jLabel26;
        private javax.swing.JLabel jLabel27;
        private javax.swing.JLabel jLabel28;
        private javax.swing.JLabel jLabel29;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel30;
        private javax.swing.JLabel jLabel31;
        private javax.swing.JLabel jLabel32;
        private javax.swing.JLabel jLabel33;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JLabel jLabel5;
        private javax.swing.JLabel jLabel6;
        private javax.swing.JLabel jLabel7;
        private javax.swing.JLabel jLabel8;
        private javax.swing.JLabel jLabel9;
        // End of variables declaration
    }

    1. When you post code, post a minimal example. Did we have to scroll through
    all those bloody labels.
    2. Can't say much for the quality of code NetBeans generates.
    3. To answer your question (sorry, I don't have an autographed copy of the photo):
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class Example {
        public static void main(String[] args) throws MalformedURLException {
            final JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            Container cp = f.getContentPane();
            cp.setBackground(new Color(0xff, 0xff, 0xee));
            cp.add(new JLabel("set the color on the content pane, not the frame"), BorderLayout.SOUTH);
            URL url = new URL("http://today.java.net/jag/bio/JagHeadshot-small.jpg");
            cp.add(new JLabel(new ImageIcon(url)));
            f.pack();
            SwingUtilities.invokeLater(new Runnable(){
                public void run() {
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }

  • How can change background color of drop down menu navigation?

    Hi,
    I am using multi level drop-down-navigation menu in my website.
    I am get good drop-down menu from htmldrive.net, but problem is how can change menu background color black to other colors.
    please help me
    Link & code is given below
    http://www.htmldrive.net/items/demo/913/Multi-Level-Drop-Down-Menu-Navigation-with-CSS3
    HTML Code
    <div id="nav">
    <ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">About Us</a></li>
    <li><a href="#">Our Portfolio</a></li>
    <li><a href="#">One Dropdown</a>
            <ul>
            <li><a href="#">Level 2.1</a></li>
            <li><a href="#">Level 2.2</a></li>
            <li><a href="#">Level 2.3</a></li>
            <li><a href="#">Level 2.4</a></li>
            <li><a href="#">Level 2.5</a></li>
            </ul>
    </li>
    <li><a href="#">Three Levels</a>
            <ul>
            <li><a href="#">Level 2.1</a></li>
            <li><a href="#">Level 2.2</a></li>
            <li><a href="#">Level 2.3</a>
                    <ul>
                    <li><a href="#">Level 2.3.1</a></li>
                    <li><a href="#">Level 2.3.2</a></li>
                    <li><a href="#">Level 2.3.3</a></li>
                    <li><a href="#">Level 2.3.4</a></li>
                    <li><a href="#">Level 2.3.5</a></li>
                    <li><a href="#">Level 2.3.6</a></li>
                    <li><a href="#">Level 2.3.7</a></li>
                    </ul>
            </li>
            <li><a href="#">Level 2.4</a></li>
            <li><a href="#">Level 2.5</a></li>
            </ul>
    </li>
    <li><a href="#">Services</a></li>
    <li><a href="#">Contact Us</a></li>
    </ul>
    </div>
    CSS CODE
    #nav {
            float: left;
            font: bold 12px Arial, Helvetica, Sans-serif;
            border: 1px solid #121314;
            border-top: 1px solid #2b2e30;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius: 5px;
            overflow: hidden;
    #nav ul {
            margin:0;
            padding:0;
            list-style:none;
    #nav ul li {
            float:left;
    #nav ul li a {
            float: left;
            color:#d4d4d4;
            padding: 10px 20px;
            text-decoration:none;
            background:#3C4042;
            background: -webkit-gradient( linear, left bottom, left top, color-stop(0.09, rgb(59,63,65)), color-stop(0.55, rgb(72,76,77)), color-stop(0.78, rgb(75,77,77)) );
            background: -moz-linear-gradient( center bottom, rgb(59,63,65) 9%, rgb(72,76,77) 55%, rgb(75,77,77) 78% );
            background: -o-linear-gradient( center bottom, rgb(59,63,65) 9%, rgb(72,76,77) 55%, rgb(75,77,77) 78% );
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 0 5px rgba(0, 0, 0, 0.1) inset;
            border-left: 1px solid rgba(255, 255, 255, 0.05);
            border-right: 1px solid rgba(0,0,0,0.2);
            text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.6);
    #nav li ul {
            background:#3C4042;
            background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.09, rgb(77,79,79)), color-stop(0.55, rgb(67,70,71)), color-stop(0.78, rgb(69,70,71)) );
            background-image: -moz-linear-gradient( center bottom, rgb(77,79,79) 9%, rgb(67,70,71) 55%, rgb(69,70,71) 78% );
            background-image: -o-linear-gradient( center bottom, rgb(77,79,79) 9%, rgb(67,70,71) 55%, rgb(69,70,71) 78% );
            border-radius: 0 0 10px 10px;
            -moz-border-radius: 0 0 10px 10px;
            -webkit-border-radius: 0 0 10px 10px;
            left: -999em;
            margin: 35px 0 0;
            position: absolute;
            width: 160px;
            z-index: 9999;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.4) inset;
            -moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.4) inset;
            -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.4) inset;
            border: 1px solid rgba(0, 0, 0, 0.5);
    #nav li ul a {
            background: none;
            border: 0 none;
            margin-right: 0;
            width: 120px;
            box-shadow: none;
            -moz-box-shadow: none;
            -webkit-box-shadow: none;
            border-bottom: 1px solid transparent;
            border-top: 1px solid transparent;

    Change this:
    .ddsmoothmenu{
    font: bold 12px Verdana;
    background: #414141; /*background of menu bar (default state)*/
    width: 100%;
    to this:
    .ddsmoothmenu{
    font: bold 12px Verdana;
    background: #new color code;
    width: 100%;
    And repeat this on other selectors.
    Nancy O.

Maybe you are looking for

  • Suddenly can't connect to home wireless network

    All of a sudden I can't connect to my home wireless network - always has worked perfectly.  Now I get a box asking for the password, and although I type it in correctly it keeps saying "incorrect password."  I thought I'd delete it and re-establish i

  • Cannot import certificate

    Hey, I've purchased a domain and a SSL certificate from Comodo but I cannot import it via the server app. The certificate consist of 5 files but the window where i'm supose to drag files doesn't seem to do anything - the import button is still grayed

  • Mavericks Says "Downloaded" But Won't Install

    As noted in the screenshot below, OS X Mavericks is listed as downloaded (which can't be possible -- it said 3 more hours to download then jumped directly to "downloaded" status).  Is there a way to restart the download from scratch?  At this point,

  • Sql server 2012 evaluation edition expired

    Hi Gurus,  sql server 2012 evaluation edition expired, Here i don't have any backups and when i browsed few blogs suggest to upgrade to another edition from Evaluation edition. 1)Do upgrading the edition keeps all  the user databases the same and how

  • How to change the tooltip names for my navbar

    Hi, Does anyone know how to change the tooltop names on the navbar as i need it to say "Next" instead of "Forward" Thank guys