0
의 모든 JFrames 가까운 주요 JFrame의 나는 새로운 넷빈즈가 "Java 응용 프로그램"프로젝트에서 실행, 나는 사용자가 파일을로드 할 수있는 주요 JFrame의에서 두 번째 JFrame의를 추가하려합니다. 넷빈즈 프로젝트, JFrames 프로젝트
그래서 나는 주요 JFrame의 주요 방법을 가지고 내가 도망 칠public static void main(String args[])
{
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(MainView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new MainView().setVisible(true);
}
});
}
이 내가 다른 JFrame의 객체, 입력 프레임을 정의한 동일한 프로젝트에서 실행되는 JFrame의입니다. 메인 프레임에는 적중 될 때 정적으로 정의 된 입력 JFrame에서 .setVisible을 수행하는 버튼이 있습니다. 그러나 입력 프레임에서 "X"를 클릭하면 메인 프레임도 닫힙니 까?
아이디어가 있으십니까?
아 맞습니다! 고맙습니다! –