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

package example;

import java.awt.*;
import javax.swing.*;

public final class MainPanel extends JPanel {
  private final JLabel label1 = new JLabel();
  private final JLabel label2 = new JLabel();
  private final JButton button1 = new JButton();
  private final JButton button2 = new JButton();

  public MainPanel() {
    super(new BorderLayout());
    label1.putClientProperty("html.disable", Boolean.TRUE);
    button1.putClientProperty("html.disable", Boolean.TRUE);

    label1.setText("<html><font color=red>Html l1</font></html>");
    button1.setText("<html><font color=red>Html b1</font></html>");
    label1.setToolTipText("<html>&lt;html&gt;&lt;font color=red&gt;Html&lt;/font&gt;&lt;/html&gt;</html>");
    button1.setToolTipText("<html><font color=red>Html</font></html>");

    label2.setText("<html><font color=red>Html l2</font></html>");
    button2.setText("<html><font color=red>Html b2</font></html>");

    Box box = Box.createVerticalBox();
    box.add(label1);
    box.add(Box.createVerticalStrut(2));
    box.add(button1);
    box.add(Box.createVerticalStrut(20));
    box.add(label2);
    box.add(Box.createVerticalStrut(2));
    box.add(button2);
    add(box);
    setBorder(BorderFactory.createEmptyBorder(20, 5, 20, 5));
    setPreferredSize(new Dimension(320, 240));
  }

  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);
  }
}

@@ -196,198 +196,8 @@
 ate 
-final JLabel label1 = new JLabel();%0A  private final JLabel label2 = new JLabel();%0A  private final JButton button1 = new JButton();%0A  private final JButton button2 = new JButton();%0A%0A  public 
 Main
@@ -234,16 +234,50 @@
 Layout()
+);%0A    JLabel label1 = new JLabel(
 );%0A    l
@@ -327,24 +327,61 @@
 lean.TRUE);%0A
+    JButton button1 = new JButton();%0A
     button1.
@@ -742,24 +742,58 @@
 %3C/html%3E%22);%0A%0A
+    JLabel label2 = new JLabel();%0A
     label2.s
@@ -839,32 +839,69 @@
 font%3E%3C/html%3E%22);%0A
+    JButton button2 = new JButton();%0A
     button2.setT

convert field to local variable in constructor