求助大佬,我GOOGLE没找到答案
import java.awt.*;import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
class MyJDialog extends JDialog
{
/**
*
*/
private static final long serialVersionUID = 1L;
public MyJDialog(buttoncla frame)
{
super(frame,"第一个JDialog窗体",true);
Container container=getContentPane();
container.add(new JLabel("这是一个对话框"));
setBounds(120,120,100,100);
}
}
public class buttoncla extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
public static void main(String []args)
{
new buttoncla();
}
public buttoncla() {
Container container=getContentPane();
container.setLayout(null);
JLabel jl=new JLabel("弹出对话框");
jl.setHorizontalAlignment(SwingConstants.CENTER);
container.add(jl);
JButton bl=new JButton("弹出对话框");
bl.setBounds(10,10,100,21);
bl.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
new MyJDialog(buttoncla.this).setVisible(true);
}
});
container.add(bl);
}
}
Exception occurred executing command line.
Cannot run program "D:\JAVA\JAVA2\bin\javaw.exe" (in directory "D:\eclipse\workspace\button2"): CreateProcess error=740, 请求的操作需要提升。
。