Commit 63b0940d authored by Trisha Gee's avatar Trisha Gee
Browse files

[Ch15] Technical review suggestions

parent adb43f4e
Loading
Loading
Loading
Loading
+1 −1
Changes for src/main/java/ch15/BeatBox.java: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ public class BeatBox {
    JPanel background = new JPanel(layout);
    background.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

    checkboxList = new ArrayList<>();
    Box buttonBox = new Box(BoxLayout.Y_AXIS);

    JButton start = new JButton("Start");
@@ -69,6 +68,7 @@ public class BeatBox {
    JPanel mainPanel = new JPanel(grid);
    background.add(BorderLayout.CENTER, mainPanel);

    checkboxList = new ArrayList<>();
    for (int i = 0; i < 256; i++) {
      JCheckBox c = new JCheckBox();
      c.setSelected(false);
+1 −1
Changes for src/main/java/ch15/TextArea1.java: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ public class TextArea1 {

    JTextArea text = new JTextArea(10, 20);
    text.setLineWrap(true);
    button.addActionListener(e -> text.append("button clicked "));
    button.addActionListener(e -> text.append("button clicked \n"));

    JScrollPane scroller = new JScrollPane(text);
    scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);