私は、研究プロジェクトの一部として、ある人間によって開発されたJavaアプリケーションに取り組んでいます。主な方法は以下の通りです:イベントのキューが使用さだけではなく イベントキューを使用してmain()で簡単なメソッドを実行する
public static void main(String[] args) {
//the MAC stuff!!
XX.getInstance(); //this line creates the UI and the event handlers
}
EventQueueのを使用して、任意の意義があり
を使用していた理由をpublic static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
// Change the name of the application on a mac
System.setProperty("com.apple.mrj.application.apple.menu.about.name",
"XX");
// Use the top of the screen for the menu on a mac
if(System.getProperty("mrj.version") != null) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
}
try {
// Use system look and feel
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
System.out.println("Cannot use system's look and feel; using Java's default instead");
}
// Create a new instance of XX
XX.getInstance();
}
});
}
を今、私は理解していませんか?
+1違反は診断するのは難しいが、防止しやすい。詳細[ここ](http://stackoverflow.com/q/3643174/230513)と[ここ](http://stackoverflow.com/q/6445143/230513)。 – trashgod