有没有谁有颜色选择的控制呀?就像是word里面的那种选择了文字后可以设置其颜色。

解决方案 »

  1.   

    选颜色的时候将该要改变颜色的color属性设置成为相应的color,不过没有选择颜色的控件给你,呵呵
      

  2.   

    if you use eclipse,i think, the problem could be solved by these codes:
            bgButton.setBackground(board.getBackground());
            bgButton.setToolTipText("Change Background Color");
            bgButton.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0)));
            bgButton.setPreferredSize(new java.awt.Dimension(50, 50));
            bgButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    bgButtonActionPerformed(evt);
                }
            });        colorPanel.add(bgButton);        mediumPanel1.add(colorPanel);if any question,go on asking.
      

  3.   

    看看这里:
    http://www.piscdong.com/entry.php/4/