JCreatorPRO3.5 解释问题

来源:百度知道 编辑:UC知道 时间:2024/06/26 01:54:44
在家里安装了一个JCreator Pro 3.5无提示英文版 家里的J2SE版本为当前最新1.6—UPDATA 12 环境变量配置正确
随便编一个小程序:
package a01;
import java.awt.*;
import javax.swing.*;
public class NewA {
public static void main(String[] args){
JFrame fr=new JFrame();
fr.Visible(true);
fr.setSize(1024,768);
Frame fr1=new Frame();
fr1.setBackground(Color.red);
fr1.setSize(800,600);
fr1.Visible(true);
}
}
编译运行出现1个红色的Frame窗口和一个JFrame窗口

如果修改这段程序 把Frame窗口全部改为注释
package a01;
import java.awt.*;
import javax.swing.*;
public class NewA {
public static void main(String[] args){
JFrame fr=new JFrame();
fr.setSize(1024,768);
fr.Visible(true);
// Frame fr1=new Frame();
// fr1.setSize(800,600);
// fr1.setBackground(Color.red);
// fr1.Visi

JC有问题,之前生成的代码阴魂不散,rebuild一下,clean一下试试

应该先保存,再编译运行

JC工具和eclipse不一样
JC 必须保存 编译 运行

运行是运行的class文件 你修改的是java文件
你必须保证你的class是最新的版本才行

如果是测试单个文件,那么:
先 Build--Compile File
后 Build--Execute File

我以前也碰到过,估计是JCreator的bug,后来下载了个4.5版本的就好了,http://www.jcreator.com/download.htm