import javax.swing.*;
import java.awt.event.ActionEvent;
-import java.io.IOException;
class MenuPanel extends JPanel {
private static final long serialVersionUID = 2012721856427052560L;
sequentialGroup.addComponent(new JButton(new ShowRandomPolygons()));
}
- private class ShowTextEditors extends AbstractAction {
+ private static class ShowTextEditors extends AbstractAction {
ShowTextEditors() {
putValue(NAME, "Text editors");
}
}
- private class ShowRain extends AbstractAction {
+ private static class ShowRain extends AbstractAction {
ShowRain() {
putValue(NAME, "Raining numbers");
}
}
}
- private class ShowPointCloud extends AbstractAction {
+ private static class ShowPointCloud extends AbstractAction {
ShowPointCloud() {
putValue(NAME, "Pointcloud galaxy");
}
}
}
- private class ShowMathGraphs extends AbstractAction {
+ private static class ShowMathGraphs extends AbstractAction {
ShowMathGraphs() {
putValue(NAME, "Mathematical graphs");
}
@Override
public void actionPerformed(final ActionEvent e) {
- try {
- GraphDemo.main(null);
- } catch (final IOException e1) {
- e1.printStackTrace();
- }
+ GraphDemo.main(null);
}
}
- private class ShowRandomPolygons extends AbstractAction {
+ private static class ShowRandomPolygons extends AbstractAction {
ShowRandomPolygons() {
putValue(NAME, "Random polygons");
}
}
}
- private class ShowOctree extends AbstractAction {
+ private static class ShowOctree extends AbstractAction {
ShowOctree() {
putValue(NAME, "Volumetric Octree");
}
}
}
- private class ShowGameOfLife extends AbstractAction {
+ private static class ShowGameOfLife extends AbstractAction {
ShowGameOfLife() {
putValue(NAME, "Game of Life");
}