Browse Source

Issue #52 button placed to right hand side

jess 8 years ago
parent
commit
246addda27
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/ui/view/GUI.java

+ 5 - 0
src/ui/view/GUI.java

@@ -282,6 +282,7 @@ public class GUI<E> implements CategoryListener {
 	private final JSlider holonBodySizeSlider = new JSlider();
 	private final JLabel lblHolonBodySize = new JLabel("HolonBody SIze");
 	private final JLabel lblSelectedElement = new JLabel("Selected Element: ");
+	private Component horizontalStrut = Box.createHorizontalStrut(20);
 
 	/**
 	 * Create the application.
@@ -922,7 +923,11 @@ public class GUI<E> implements CategoryListener {
 		
 		toolBarGraph.add(lblSelectedElement);
 		toolBarGraph.add(elementGraph);
+		horizontalStrut = Box.createHorizontalStrut(toolBarGraph.getWidth()-resetGraphBtn.getWidth());
+		
+		toolBarGraph.add(horizontalStrut);
 		resetGraphBtn.setHorizontalAlignment(SwingConstants.RIGHT);
+		
 		toolBarGraph.add(resetGraphBtn);
 		toolBarGraph.setFloatable(false);
 		scrollGraph.setRowHeaderView(graphLabel);