1.如何让一个控件获得焦点,TextField tf=new TextField(30);tf.setFocusable();???
2JCreator3.5设置问题:
引用的包在d:\,当前的程序在c:\test\下,看书上说需要设置class path,再import.
设置步骤如下:configue--jdk profiles--选中j2skd---edit---class---add--addpath---添加d:\---确定.可设置完后,就连原来编译通过的程序也编译不了,都是类似下面的提示,总之,修改过后所有的.java都无法编译生成.class文件.
请教该如何在JCreator中设置新增加的classpath.--------------------Configuration: <Default>--------------------
javac: invalid flag: C:\test\Interface1.java 
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -source <release>         Provide source compatibility with specified release
  -target <release>         Generate class files for specific VM version
  -help                     Print a synopsis of standard options
Process completed.

解决方案 »

  1.   

    path环境变量中加入javac所在目录
      

  2.   

    谢谢楼上的,可path中原来就已添加过的: %JAVA_HOME%\bin;以命令行的方式编译没有问题,可在JCreator中只有修改了classpath,就编译不了,可我就是想试一下跨盘访问包的情况,是不是JCreator中的classpath就不让修改呢:(
      

  3.   

    不太明白你想干什么能看看我的问题吗?
    我知道应该是JDBC驱动的问题。
    我在环境变量中已经配置了 mysql-connector-java-3.2.0-alpha-bin.jar 的路径(包括文件名)。
    配置在 path 里面Class.forName(com.mysql.jdbc.Driver);
    System.out.println("Success loading MySQL Driver!");
    PATH里面我设置了BIN目录
    CLASSPAHT里面设置了
    tools.jar和驱动.jar的完整路径
      

  4.   

    hoho,终于搞定,原来没有建立工程,所以不让修改.只要新建一个工程文件,就可以通过修改工程属性来修改CLASSpath了.哎,惭愧.又冤死了N多脑细胞.你的问题我不懂呀,我是新手呀,送分给你,再开个贴问别人吧,结贴.