Created
February 5, 2012 01:48
-
-
Save rhiguchi/1741883 to your computer and use it in GitHub Desktop.
Swingビューテストのテンプレート
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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