diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelView.java b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelView.java index af773d7..0cf4ddb 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelView.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/resultpanel/ResultPanelView.java @@ -44,6 +44,9 @@ public class ResultPanelView extends VOTableView { /** The listener of the result panel. */ ResultPanelListener listener; + /** The JPanel containing the buttons. */ + private JPanel buttonsPanel; + /** * Method constructor which customize the result panel, but don't build it from scratch since @@ -64,7 +67,7 @@ public class ResultPanelView extends VOTableView { JPanel bottomBar = new JPanel(); bottomBar.setLayout(new BorderLayout()); bottomBar.add(getStatusBar(), BorderLayout.CENTER); - bottomBar.add(getFileButton(), BorderLayout.EAST); + bottomBar.add(getButtonsPanel(), BorderLayout.EAST); add(bottomBar, BorderLayout.SOUTH); } @@ -109,4 +112,16 @@ public class ResultPanelView extends VOTableView { getStatusBar().setText(infoText); } + /** + * Create if necessary the buttons panel, then return it. + * + * @return the buttons panel. + */ + public JPanel getButtonsPanel() { + if (buttonsPanel == null) { + buttonsPanel = new JPanel(); + buttonsPanel.add(getFileButton()); + } + return buttonsPanel; + } } -- libgit2 0.21.2