Explorar o código

Issue #52 button placed to right hand side

jess %!s(int64=8) %!d(string=hai) anos
pai
achega
246addda27
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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 JSlider holonBodySizeSlider = new JSlider();
 	private final JLabel lblHolonBodySize = new JLabel("HolonBody SIze");
 	private final JLabel lblHolonBodySize = new JLabel("HolonBody SIze");
 	private final JLabel lblSelectedElement = new JLabel("Selected Element: ");
 	private final JLabel lblSelectedElement = new JLabel("Selected Element: ");
+	private Component horizontalStrut = Box.createHorizontalStrut(20);
 
 
 	/**
 	/**
 	 * Create the application.
 	 * Create the application.
@@ -922,7 +923,11 @@ public class GUI<E> implements CategoryListener {
 		
 		
 		toolBarGraph.add(lblSelectedElement);
 		toolBarGraph.add(lblSelectedElement);
 		toolBarGraph.add(elementGraph);
 		toolBarGraph.add(elementGraph);
+		horizontalStrut = Box.createHorizontalStrut(toolBarGraph.getWidth()-resetGraphBtn.getWidth());
+		
+		toolBarGraph.add(horizontalStrut);
 		resetGraphBtn.setHorizontalAlignment(SwingConstants.RIGHT);
 		resetGraphBtn.setHorizontalAlignment(SwingConstants.RIGHT);
+		
 		toolBarGraph.add(resetGraphBtn);
 		toolBarGraph.add(resetGraphBtn);
 		toolBarGraph.setFloatable(false);
 		toolBarGraph.setFloatable(false);
 		scrollGraph.setRowHeaderView(graphLabel);
 		scrollGraph.setRowHeaderView(graphLabel);