我用JCreator pro创建新的Basic Java Application工程 为什么只有这样的代码出来:/**
* @(#)Test.java
*
* Test application
*
* @author
* @version 1.00 2009/5/17
*/
public class Test {
public static void main(String[] args) {
// TODO, add your application code
System.out.println("Hello World!");
}
}
请各高手指点一下:
* @(#)Test.java
*
* Test application
*
* @author
* @version 1.00 2009/5/17
*/
public class Test {
public static void main(String[] args) {
// TODO, add your application code
System.out.println("Hello World!");
}
}
请各高手指点一下:
解决方案 »
- java JavaScript
- oracle 链接报错
- 各位大侠,帮帮忙,小弟大一,JAVA的课程设计,帮忙看看
- 关于org.w3c.dom写入XML文件中字符转译的问题之"&"符号~~~~~~~~~~
- 为什么在DOS命令下,我的JAVA程序不能运行!
- 请教各位大虾,我的jsp保存成txt后,前面有两个空行,怎么解决????????????????
- 简单的问题
- applet在html中不能看出效果。有分的,来吧。
- 在java中,能否对IP包中的字段进行设置?
- 为什么我的jbuilder总是把汉字输入法给调了出来,能去掉吗?
- 为什么用jcreator pro 4.0的Basic java application新建的工作区不是带窗口的?
- 测试接力
import java.awt.event.*;/**
* Sample application using Frame.
*
* @author
* @version 1.00 09/05/17
*/
public class DdFrame extends Frame {
/**
* The constructor.
*/
public DdFrame() {
MenuBar menuBar = new MenuBar();
Menu menuFile = new Menu();
MenuItem menuFileExit = new MenuItem();
menuFile.setLabel("File");
menuFileExit.setLabel("Exit");
// Add action listener.for the menu button
menuFileExit.addActionListener
(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
DdFrame.this.windowClosed();
}
}
);
menuFile.add(menuFileExit);
menuBar.add(menuFile);
setTitle("Dd");
setMenuBar(menuBar);
setSize(new Dimension(400, 400));
// Add window listener.
this.addWindowListener
(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {
DdFrame.this.windowClosed();
}
}
);
}
/**
* Shutdown procedure when run as an application.
*/
protected void windowClosed() {
// TODO: Check if it is safe to close the application
// Exit application.
System.exit(0);
}
}
import java.awt.*;
import java.awt.event.*;/**
* Sample application using Frame.
*
* @author
* @version 1.00 09/05/17
*/
public class DdFrame extends Frame {
/**
* The constructor.
*/
public DdFrame() {
MenuBar menuBar = new MenuBar();
Menu menuFile = new Menu();
MenuItem menuFileExit = new MenuItem();
menuFile.setLabel("File");
menuFileExit.setLabel("Exit");
// Add action listener.for the menu button
menuFileExit.addActionListener
(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
DdFrame.this.windowClosed();
}
}
);
menuFile.add(menuFileExit);
menuBar.add(menuFile);
setTitle("Dd");
setMenuBar(menuBar);
setSize(new Dimension(400, 400));
// Add window listener.
this.addWindowListener
(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {
DdFrame.this.windowClosed();
}
}
);
}
/**
* Shutdown procedure when run as an application.
*/
protected void windowClosed() {
// TODO: Check if it is safe to close the application
// Exit application.
System.exit(0);
}
}