Java JComboBox setColorMenu(JComboBox choice)

Here you can find the source of setColorMenu(JComboBox choice)

Description

set Color Menu

License

Open Source License

Declaration

public static void setColorMenu(JComboBox choice) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

public class Main {
    public static void setColorMenu(JComboBox choice) {
        choice.addItem("BLACK");
        choice.addItem("WHITE");
        choice.addItem("RED");
        choice.addItem("YELLOW");
        choice.addItem("GREEN");
        choice.addItem("CYAN");
        choice.addItem("DARKGRAY");
        choice.addItem("LIGHTGRAY");
        choice.addItem("GRAY");
        choice.addItem("MAGENTA");
        choice.addItem("ORANGE");
        choice.addItem("PINK");
        choice.addItem("BLUE");
    }/*from w  ww  . ja va  2s . c om*/
}

Related

  1. prepareComboBox(JComboBox comboBox, Dimension size, int min, int max, int[] list)
  2. registerBrowseButtonListener(final JComboBox comboBox, final JButton button, final boolean chooseFile, final boolean isOpen, final FileFilter fileFilter, final File initialDirectory)
  3. removeAllListeners(JComboBox box)
  4. resetComboBoxInfo(JComboBox jComboBoxField, ArrayList comboBoxArray, String expression)
  5. resetPhaseBox(JComboBox phaseBox)
  6. setComboBoxTheme(JComboBox comboBox)
  7. setErrorBackground(JComboBox comp)
  8. setJComboBoxAsHeavyweight(JComboBox combo)
  9. setPopupComboChoices(JComboBox aComboBox, String aS)