package example;
//-*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
//@homepage@
import java.awt.*;
import javax.swing.*;
import javax.swing.event.*;

public final class MainPanel extends JPanel {
    private static final String LF = "\n";
    private MainPanel() {
        super(new BorderLayout());
        StringBuffer buf = new StringBuffer();
        for (int i = 0; i < 100; i++) {
            buf.append(i + LF);
        }

        final JScrollPane scrollPane = new JScrollPane(new JTextArea(buf.toString()));
        scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        JSpinner spinner = new JSpinner(new SpinnerNumberModel(scrollPane.getVerticalScrollBar().getUnitIncrement(1), 1, 100000, 1));
        spinner.setEditor(new JSpinner.NumberEditor(spinner, "#####0"));
        spinner.addChangeListener(e -> {
            JSpinner s = (JSpinner) e.getSource();
            scrollPane.getVerticalScrollBar().setUnitIncrement((Integer) s.getValue());
        });
        Box box = Box.createHorizontalBox();
        box.add(new JLabel("Unit Increment:"));
        box.add(Box.createHorizontalStrut(2));
        box.add(spinner);
        box.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        add(box, BorderLayout.NORTH);
        add(scrollPane);
        setPreferredSize(new Dimension(320, 240));
    }

    public static void main(String... args) {
        EventQueue.invokeLater(new Runnable() {
            @Override public void run() {
                createAndShowGUI();
            }
        });
    }
    public static void createAndShowGUI() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        } catch (ClassNotFoundException | InstantiationException
               | IllegalAccessException | UnsupportedLookAndFeelException ex) {
            ex.printStackTrace();
        }
        JFrame frame = new JFrame("@title@");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.getContentPane().add(new MainPanel());
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }
}

@@ -105,24 +105,59 @@
 java.awt.*;%0A
+import java.util.stream.IntStream;%0A
 import javax
@@ -404,51 +404,44 @@
     
-for (int i = 0; i %3C 100; i++) %7B%0A           
+IntStream.range(0, 100).forEach(i -%3E
  buf
@@ -455,27 +455,18 @@
 (i + LF)
+)
 ;
-%0A        %7D
 %0A%0A      
@@ -467,22 +467,16 @@
         
-final 
 JScrollP

use IntStream.range(...) instead of for (...)