if(jRadioButtonLine.isSelected()){
panel.addShape(new Line(x, y, _x, _y));
}
if(jRadioButtonOval.isSelected()){
if(x > _x && y > _y){
panel.addShape(new Oval(_x, _y, x - _x, y - _y));
}
else if(x > _x && y < _y){
panel.addShape(new Oval(_x, y, x - _x, _y - y));
}
else if(x < _x && y > _y){
panel.addShape(new Oval(x, _y, _x - x, y - _y));
}
else{
panel.addShape(new Oval(x, y, _x - x, _y - y));
}
}
if(jRadioButtonRectangle.isSelected()){
if(x > _x && y > _y){
panel.addShape(new Rectangle(_x, _y, x - _x, y - _y));