public void actionPerformed(ActionEvent e) {
AnimationSetViewer view = (AnimationSetViewer) animationSets.getSelectedComponent();
if(e.getSource()==newAnimationSetButton) {
String newSetName = JOptionPane.showInputDialog("New Animation Set Name:");
if(newSetName==null || newSetName.isEmpty()) return;
AnimationSet newSet = new AnimationSet(newSetName);
editor.getData().addAnimationSet(newSet);
} else { // The rest of the buttons are related to a view
if(view==null) { // So if no view is selected, an error is shown
JOptionPane.showMessageDialog(editor, "No animation set selected!","Error!",JOptionPane.ERROR_MESSAGE);
return;