2017-07-05 5 views
0

私はModalJInternalFrameを拡張するJframeを持っています。 1クラスのコンストラクタでは、私は、フレームのタイトルとサイズを入れている:別のクラスにおいてInternalFrameListenerはJFrameの読み込みを中断します

public class ApplicInternalFrame extends ModalJInternalFrame { 
private static final long serialVersionUID = 1L; 

public ApplicInternalFrame(Component parent) throws CommonException { 
    super(parent, "Applic", false, false); 
    this.setSize(200, 200); 
} 

私はそれでGUIを作成しています:

public class ApplicabilityChooserPanel extends CdmPanel implements ActionListener, ComponentListener, Runnable { 
public ApplicabilityChooserPanel(Component parent, [...]) throws CommonException { 
parentFrame = new FrameWrapper(parent); 

JInternalFrame test = FrameUtils.getParentInternalFrame(parentFrame.getContentPane()); 
[...] 
buildGUI(); 

test.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() { 
     public void internalFrameClosing(InternalFrameEvent e) { 
      System.out.println("Hello World"); 
     } 
    }); 

「テスト」は完全になりますフレームオブジェクト、そして私は他の中では "テスト"を通してフレームの "Applic"タイトルを見ることができます。私の問題は "test.addInternalFrameListener(...)"という行にあります。これらの最後のコード行を使用すると、EclipseはClassLoader.classの「目に見えない」ブレークポイントに入り、フレームはまったく開きません。 ウィンドウ内の "X"をクリックしたときにアクションが発生するのを助ける必要があります。

ご意見をいただければ幸いです。

答えて

関連する問題