A good Live Template for Swing developers
April 24th, 2006 by Alexandra RusinaA 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.
April 24th, 2006 at 1:09 pm
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);
}
}