Skip to content

Instantly share code, notes, and snippets.

@rhiguchi
Created February 5, 2012 01:48
Show Gist options
  • Save rhiguchi/1741883 to your computer and use it in GitHub Desktop.
Save rhiguchi/1741883 to your computer and use it in GitHub Desktop.
Swingビューテストのテンプレート
import javax.swing.JFrame;
public class ViewTest {
ViewTest craeteView() {
return new ViewTest();
}
public static void main(String[] args) {
final ViewTest test = new ViewTest();
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
JFrame frame = new JFrame(test.getClass().getSimpleName());
frame.setContentPane(test.craeteView().getContainer());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment