Click handler for setting the active color and shape button in a drawing program public void actionPerformed(ActionEvent e) {
        Object source = e.getSource();
        if (source.equals(jbColor1))
            color = getBlue();
        else if (source.equals(jbColor2))
            color = getRed();
        else if (source.equals(jbColor3))
            color = getGreen();
        else if (source.equals(jbColor4))
            color = getBlack();
        else if (source.equals(jbColor5))
            color = getYellow();
        else if (source.equals(jbColor6))
            color = getPink();
        else if (source.equals(btnRectangle)) {
            isSelectedReactangle = true;
            isSelectedCircle = false;
            isSelectedLine = false;
            btnRectangle.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));
            btnLine.setBorder(UIManager.getBorder(defaultbtnLable));
            btnCircle.setBorder(UIManager.getBorder(defaultbtnLable));
            count = 0;
        } else if (source.equals(btnCircle)) {
            isSelectedReactangle = false;
            isSelectedCircle = true;
            isSelectedLine = false;
            btnCircle.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));
            btnLine.setBorder(UIManager.getBorder(defaultbtnLable));
            btnRectangle.setBorder(UIManager.getBorder(defaultbtnLable));
            count = 0;
        } else if (source.equals(btnLine)) {
            isSelectedReactangle = false;
            isSelectedCircle = false;
            isSelectedLine = true;
            btnLine.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));
            btnRectangle.setBorder(UIManager.getBorder(defaultbtnLable));
            btnCircle.setBorder(UIManager.getBorder(defaultbtnLable));
            count = 0;
        } else if (source.equals(btnClear)) {
            btnLine.setBorder(UIManager.getBorder(defaultbtnLable));
            btnRectangle.setBorder(UIManager.getBorder(defaultbtnLable));
            btnCircle.setBorder(UIManager.getBorder(defaultbtnLable));
            panelContent.repaint();
        }
}


I have some code but i would avoid if else statement. 
for example this snippet code is repeating few times.

btnLine.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3));
btnRectangle.setBorder(UIManager.getBorder(defaultbtnLable));
btnCircle.setBorder(UIManager.getBorder(defaultbtnLable));


Some tips and tricks how to avoid if condition so many times
Why would you have one actionPerformed() method for multiple UI elements instead of creating each button with its individual Action instance? Like:

Action clearAction = new AbstractAction("Clear") {
        public void actionPerformed(ActionEvent e) {
            btnLine.setBorder(UIManager.getBorder(defaultbtnLable));
            btnRectangle.setBorder(UIManager.getBorder(defaultbtnLable));
            btnCircle.setBorder(UIManager.getBorder(defaultbtnLable));
            panelContent.repaint();
        }
}
btnClear = new JButton(clearAction);


[Disclaimer: may contain typos, didn't check it in an IDE]

Then the Action is a first-class object, can be bound to multiple UI elements (e.g. a button and a main menu item) and contains both the name (plus an icon if you like) and the implementation.

And if the Actions have common elements, maybe it's worth having them inherit from a common base Action class.