JApplet에서 modal JDialog 띄우기

leonid의 이미지

JApplet에서 modal한 JDialog를 띄우고 싶습니다.

제가 시도한 코드 :

---JApplet에서----

new AboutDialog(this);

---JDialog에서----

public AboutDialog(JApplet parent) {

super(JOptionPane.getFrameForComponent(parent), true);
setTitle("About DodgeSnow VERSION " + DodgeSnow.VERSION);
initComponents();
setVisible(true);
}

appletviewer에서는 잘 띄워지는데 html파일을 만들어서 테스트해보니 안되더라구요. -_-;

도와주세요..

netisinfinite의 이미지

public class TestApplet extends JApplet implements ActionListener{
	public void init(){
		JButton btn = new JButton("click me!");
		btn.addActionListener(this);
		add(btn);
	}
	public void actionPerformed(ActionEvent e){
		new AboutDialog(this);
	}
}

public class AboutDialog extends JDialog{
	public AboutDialog(JApplet parent) {
		super(JOptionPane.getFrameForComponent(parent), true);
		setTitle("About DodgeSnow TEST");
		initComponents();
		setVisible(true);
	}
	private void initComponents(){
		add(new JLabel("TEST"));
		pack();
	}
}

애플릿 한지가 하도 오래되서 대충 만들어 봤는데... 잘 되는데요?
IE라면 혹시 MS VM이 체크되어 있지 않은지 확인해보시고,
그래도 안 된다면 어디가 어떻게 안 되는지의 설명과 좀더 많은 소스가 필요할 것 같습니다.

leonid의 이미지

NetBeans에서 제공하는

org.jdesktop.layout.GroupLayout라는 클래스를

폴더에 같이 안넣어서 그렇게 된거였네요.

그래서 NetBeans에서는 잘 돌아갔지만

막상 distribute 하려 하면 안되는거였죠 --;

답변 감사드립니다.