A good Live Template for Swing developers

Posted on by alexandra.rusina

A nice Live Template for Swing developers was posted at publicobject.com. The template can save you a lot of time when prototyping Swing code.
If you want to find more live templates examples, take a look at the Defining a Live Template for Null-Check post and its comments.

Technorati tags: , ,
Comments below can no longer be edited.

1 Response to A good Live Template for Swing developers

  1. Mike P says:

    April 24, 2006

    I use a File Template for a very similiar purpose, if anyone is interest here you go:

    package ${PACKAGE_NAME};
    #parse(“File Header.java”)
    public class ${NAME} extends JFrame {
    public ${NAME}() {
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    this.setContentPane(mainPanel);

    this.pack();
    this.setVisible(true);
    }

    public static void main(String[] args) {
    Runnable createAndShowGui = new Runnable() {
    public void run() {
    new ${NAME}();
    }
    };

    EventQueue.invokeLater(createAndShowGui);
    }
    }

Subscribe

Subscribe for updates