title: Set foreground and background color of JButton with JColorChooser
body: <p>I have a simple application which consists of a JButton and a JColorChooser.
  When i press the button 2 JColorChoosers appear.The one allows me to select a background color and the second one allows me to select a foreground color.
  I save each color in a separate variable.Here is my code:</p>
  
  <pre><code>    public class Slide extends JFrame{
  
          Color bgColor;
          JButton colorButton=new JButton();
          JColorChooser colorPicker=new JColorChooser();
          public Slide(){
              JPanel panel=new JPanel();
              panel.setLayout(new MigLayout("", "[][][][][]", "[][][][][][]"));
              this.setContentPane(panel);
              colorButton.addActionListener(new ActionListener() {
                  public void actionPerformed(ActionEvent arg0) {
                      //1st color chooser for background color
                      bgColor=JColorChooser.showDialog(null, "Background color", null);
  //2nd colorchooser appears for foreground
                      Color fgColor=JColorChooser.showDialog(null, "Foreground color", null);
                      colorButton.setBackground(bgColor);
                      colorButton.setForeground(fgColor);
                  }
              });
              colorButton.setText("Pick a color");
              panel.add(colorButton, "cell 0 5");
              this.setSize(400, 400);
              this.setVisible(true);
              this.setDefaultCloseOperation(EXIT_ON_CLOSE);
          }
  
          public static void main(String args[]){
              new Slide();
          }
      }
  </code></pre>
  
  <p>Now my question is:Is it possible to minimize the part of the JColorChooser.I mean I want to show The JColorChooser only once and get both foreground and background colors from the user</p>