Skip to content
Snippets Groups Projects
Commit 0436f9a8 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Still some issues with swing revalidating

parent 766f50ef
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,8 @@ public class ClusterView extends ComfortPanel { ...@@ -19,8 +19,8 @@ public class ClusterView extends ComfortPanel {
public ClusterView() { public ClusterView() {
this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
this.title = new JLabel(); this.title = new JLabel("CLUSTERTITLE");
this.clusterSize = new JLabel(); this.clusterSize = new JLabel("CLUSTERLABEL");
this.nodeList = new JList<String>(); this.nodeList = new JList<String>();
this.addAll(title,clusterSize,nodeList); this.addAll(title,clusterSize,nodeList);
...@@ -28,10 +28,14 @@ public class ClusterView extends ComfortPanel { ...@@ -28,10 +28,14 @@ public class ClusterView extends ComfortPanel {
public void setTitle(long x) { public void setTitle(long x) {
this.title.setText(LocalizationManager.get("cluster")+" "+x); this.title.setText(LocalizationManager.get("cluster")+" "+x);
revalidate();
repaint();
} }
public void setClusterSize(long x) { public void setClusterSize(long x) {
this.clusterSize.setText(LocalizationManager.get("clusterSize")+" "+x); this.clusterSize.setText(LocalizationManager.get("clusterSize")+" "+x);
revalidate();
repaint();
} }
public void addNode(CyNode node) { public void addNode(CyNode node) {
......
package de.hhu.ba.yoshikoWrapper.gui; package de.hhu.ba.yoshikoWrapper.gui;
import javax.swing.BoxLayout;
import javax.swing.JLabel; import javax.swing.JLabel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
...@@ -10,6 +11,7 @@ public class SolutionTab extends ComfortPanel { ...@@ -10,6 +11,7 @@ public class SolutionTab extends ComfortPanel {
private final JLabel testLabel; private final JLabel testLabel;
public SolutionTab() { public SolutionTab() {
this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
//init swing components //init swing components
scrollPane = new JScrollPane(); scrollPane = new JScrollPane();
testLabel = new JLabel("test"); testLabel = new JLabel("test");
...@@ -20,6 +22,8 @@ public class SolutionTab extends ComfortPanel { ...@@ -20,6 +22,8 @@ public class SolutionTab extends ComfortPanel {
public ClusterView addCluster(long k) { public ClusterView addCluster(long k) {
ClusterView clusterView = new ClusterView(); ClusterView clusterView = new ClusterView();
scrollPane.add(clusterView); scrollPane.add(clusterView);
scrollPane.revalidate();
scrollPane.repaint();
return clusterView; return clusterView;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment