diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/GUIDim.java b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/GUIDim.java index f95ad42..d650cf0 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/GUIDim.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/GUIDim.java @@ -27,7 +27,7 @@ public class GUIDim { public static final int LEFT_PANEL_WIDTH = 400; /** The minimum width of the left panel (services view). */ - public static final int LEFT_PANEL_MIN_WIDTH = 150; + public static final int LEFT_PANEL_MIN_WIDTH = 300; /** The width of the right panel (request view). */ public static final int RIGHT_PANEL_WIDTH = 400; diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/panels/ServicesPanel.java b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/panels/ServicesPanel.java index d2f4c94..bd0c8b9 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/panels/ServicesPanel.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/panels/ServicesPanel.java @@ -16,7 +16,6 @@ package eu.omp.irap.vespa.epntapclient.gui.panels; -import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -69,7 +68,7 @@ public class ServicesPanel extends VOTableView { } }); - this.add(buildAddServicePanel(), BorderLayout.SOUTH); + this.add(buildAddServicePanel()); } private JPanel buildAddServicePanel() { diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java index c2316f0..35b9c97 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/view/VOTableView.java @@ -16,16 +16,19 @@ package eu.omp.irap.vespa.epntapclient.votable.view; -import java.awt.BorderLayout; import java.util.List; +import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; +import javax.swing.RowSorter; import javax.swing.ScrollPaneConstants; import javax.swing.event.TableModelEvent; import javax.swing.event.TableModelListener; import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; +import javax.swing.table.TableRowSorter; import eu.omp.irap.vespa.epntapclient.votable.utils.Utils; @@ -68,13 +71,16 @@ public class VOTableView extends JPanel implements TableModelListener { } private void buildVOTableView() { - JScrollPane scrollPane = new JScrollPane(table); + setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); + + RowSorter sorter = new TableRowSorter(tableData); + table.setRowSorter(sorter); + JScrollPane scrollPane = new JScrollPane(table); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); - setLayout(new BorderLayout()); - add(scrollPane, BorderLayout.CENTER); + add(scrollPane); } /** -- libgit2 0.21.2