Changing color via JRadioButtons and JButtons
For my first code review, I hope you find this useful!

Firstly, I like the fact you've used arrays for your buttons, this is good. The name of the array is also nice and descriptive.

colorbuttons = new JButton[]{new JButton(),


Looking at some of your other variable names, I'm not quite as happy.

bar = new JMenuBar();
menu1 = new JMenu("Edit circle");
sub1 = new JMenu("Colour");
colors = new JRadioButtonMenuItem[]{new JRadioButtonMenuItem("White"),
color 


Firstly colors I'd expect a list/array of colours - but no, it's an array of radio button menu items. I think color is your worst offender here. By reading the variable name, we don't know what object it's the color of.



Now, you have buttons related to a subset of colours. So I would start with an enum that will keep a track of the Color and the name

private enum EColorSet {
    eWhite(Color.WHITE, "White"),
    eGreen(Color.GREEN, "Green"),
    eRed(Color.RED, "Red"),
    eYellow(Color.YELLOW, "Yellow"),
    eBlue(Color.BLUE, "Blue"),
    eBlack(Color.BLACK, "Black");

    Color c;
    String label; 

    private EColorSet(Color c, String label)
    { 
        this.c = c;
        this.label = label;
    }
}


Now that you have a set of colours to iterate against, you can set up your arrays as follows

colorbuttons = new JButton[EColorSet.values().length]
colors = new JRadioButtonMenuItem[EColorSet.values().length]


and initialise them whilst looping through the colours

for (EColorSet currentColor : EColorSet.values()) {
    colourbuttons[currentColor.ordinal()] = new JButton();
    colourbuttons[currentColor.ordinal()].setBackground(currentColor.c);
    //do the same for the colors menu items -note you use the label...
}


see the fact in colourbuttons[currentColor.ordinal()] .setBackground(currentColor.c); i'm using the colour stored in my enum

We need to map the button (or menu item click) to an index in the array, which also represents a EColorSet instance. Unfortunately, we still need the index of the button in the array, but 

public void actionPerformed(ActionEvent e) {
    JButton temp = (JButton)e.getSource();

    int index = 0;
    for(JButton b : colourbuttons) {
        if(temp.equals(b)) {
            break;
        }
        index ++;
    }
    EColorSet currentColor = EColorSet.values()[index];
    setColor(currentColor);
    setMenuFromColor(currentColor);
}


Now to finish this off, when a button is clicked, we need to find the index, but we can do this as we know the color now.

private void setMenuFromColor(EColorSet colourClicked){
    colors[colorClicked.ordinal].setSelected(true);
    //set the menu to selected
}



private void setColor(EColorSet colourClicked){
    //set the colour of the circle
}