33import java .awt .BorderLayout ;
44import java .awt .Color ;
55import java .awt .Dimension ;
6+ import java .awt .GridBagLayout ;
67import java .awt .Toolkit ;
78
89import javax .swing .JButton ;
@@ -46,7 +47,7 @@ public ContentWindow(AlgVisualizer algVisualizer) {
4647
4748 /*
4849 * Initializes all of the components that will be in this frame. Add the action
49- * / change listeners and set their colors.
50+ * change listeners and set their colors.
5051 */
5152 public void initComponents () {
5253
@@ -59,7 +60,7 @@ public void initComponents() {
5960 sizeOptions = new String [] { "10" , "50" , "100" , "250" , "500" , "1000" };
6061 } else if (screenHeight < 1080.0 ) { // too small for original dimensions
6162 arrDisplayHeight = 500 ;
62- contentWidth = arrDisplayHeight + 400 ;
63+ contentWidth = arrDisplayHeight + 500 ;
6364 sizeOptions = new String [] { "10" , "50" , "100" , "250" , "500" };
6465 } else { // Original dimensions (1080p)
6566 arrDisplayHeight = 900 ;
@@ -81,10 +82,9 @@ public void initComponents() {
8182 buttonPanel .setBackground (Color .DARK_GRAY );
8283
8384 arrPanel = new JPanel ();
85+ arrPanel .setLayout (new GridBagLayout ());
8486 arrPanel .setBackground (Color .DARK_GRAY );
8587 arrPanel .add (arrDisplay );
86- //arrPanel.setPreferredSize(new Dimension(arrDisplayWidth, arrDisplayHeight));
87- arrDisplay .setAlignmentX (0 );
8888
8989 // Initialize all components and add action listeners
9090 resetButton = new JButton ("Reset" );
0 commit comments