diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ClusterView.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ClusterView.java index da5040ec3dcc14494fa8f49b807d3b087003f565..9586f3ef1a59ad2f337351b2b5e8324c78134004 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ClusterView.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ClusterView.java @@ -19,8 +19,8 @@ public class ClusterView extends ComfortPanel { public ClusterView() { this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); - this.title = new JLabel(); - this.clusterSize = new JLabel(); + this.title = new JLabel("CLUSTERTITLE"); + this.clusterSize = new JLabel("CLUSTERLABEL"); this.nodeList = new JList<String>(); this.addAll(title,clusterSize,nodeList); @@ -28,10 +28,14 @@ public class ClusterView extends ComfortPanel { public void setTitle(long x) { this.title.setText(LocalizationManager.get("cluster")+" "+x); + revalidate(); + repaint(); } public void setClusterSize(long x) { this.clusterSize.setText(LocalizationManager.get("clusterSize")+" "+x); + revalidate(); + repaint(); } public void addNode(CyNode node) { diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionTab.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionTab.java index 300a4f2e5bc0c068fb6f1cf1122df5491dbcb480..42450530b19fff488fe78aaae9b3f5da65cd02df 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionTab.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionTab.java @@ -1,5 +1,6 @@ package de.hhu.ba.yoshikoWrapper.gui; +import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JScrollPane; @@ -10,6 +11,7 @@ public class SolutionTab extends ComfortPanel { private final JLabel testLabel; public SolutionTab() { + this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //init swing components scrollPane = new JScrollPane(); testLabel = new JLabel("test"); @@ -20,6 +22,8 @@ public class SolutionTab extends ComfortPanel { public ClusterView addCluster(long k) { ClusterView clusterView = new ClusterView(); scrollPane.add(clusterView); + scrollPane.revalidate(); + scrollPane.repaint(); return clusterView; }