나는 약간의 기본을하고있다 Java Swing application
(초급). 내가 창을 colse하는 close button on JFrame
을 누를 때 나는 무엇을해야 내가 대신 JOptionPane Confirm Dialog
를 원하는 것입니다 간단 가까운 여기JFrame을위한 팝업 버튼 닫기
는 코드 JFrame의
JFrame frame= new JFrame("frame");
frame.setSize(300,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.pack();
하고있는 JOptionPane 코드는이
final JOptionPane optionPane = new JOptionPane("Are You sure?",JOptionPane.QUESTION_MESSAGE,
JOptionPane.YES_NO_OPTION);
처럼 간다
그래서 JFrame의 닫기 버튼을 누르면이 팝업이 나타나지 않습니다. 직접 닫음
제발 내가 할 수있는 방법을 안내합니다 .. 감사합니다 사전에
가 ([이]를 살펴 보자 http://stackoverflow.com/questions/3777146/how-can-a-swing- windowlistener-veto-jframe-closing) – MadProgrammer