// -*- mode:java; encoding:utf-8 -*-
// vim:set fileencoding=utf-8:
// @homepage@

package example;

import java.awt.*;
import java.util.stream.IntStream;
import javax.swing.*;

public final class MainPanel extends JPanel {
  private static final String LF = "\n";
  private final Dimension preferredSize = new Dimension(320, 240);

  public MainPanel() {
    super(new BorderLayout());
    StringBuilder buf = new StringBuilder();
    IntStream.range(0, 1000).forEach(i -> buf.append(i + LF));

    JSplitPane sp = new JSplitPane();
    sp.setLeftComponent(new JScrollPane(new JTextArea(buf.toString())));

    UIManager.put("ScrollBar.minimumThumbSize", new Dimension(32, 32));
    sp.setRightComponent(new JScrollPane(new JTextArea(buf.toString())));

    sp.setResizeWeight(.5);
    add(sp);
  }

  @Override public Dimension getPreferredSize() {
    return preferredSize;
  }

  public static void main(String[] args) {
    EventQueue.invokeLater(MainPanel::createAndShowGui);
  }

  private static void createAndShowGui() {
    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
      ex.printStackTrace();
      Toolkit.getDefaultToolkit().beep();
    }
    JFrame frame = new JFrame("@title@");
    frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    frame.getContentPane().add(new MainPanel());
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
  }
}

@@ -258,16 +258,17 @@
 = %22%5Cn%22;%0A
+%0A
   privat
@@ -273,75 +273,8 @@
 ate 
-final Dimension preferredSize = new Dimension(320, 240);%0A%0A  public 
 Main
@@ -417,11 +417,17 @@
 nd(i
- + 
+).append(
 LF))
@@ -683,25 +683,24 @@
 tring())));%0A
-%0A
     sp.setRe
@@ -798,21 +798,31 @@
 urn 
-preferredSize
+new Dimension(320, 240)
 ;%0A  

replace with chained append() calls