2 Replies Latest reply on Oct 14, 2011 7:02 PM by EJP

    JLabel constructor call problem


      I've problem with calling JLabel's constructor with passing String value to constructor.
      jobject jobjLabel;
      jclass JLabelClass;
      jmethodID mid;
      JLabelClass = (*env)->FindClass(env,"javax/swing/JLabel");
        if(JLabelClass == NULL) {
           printf("Can't find class JLabel\n");
           goto destroy;
        mid = (*env)->GetMethodID(env,JLabelClass,"<init>","(Ljava/lang/String;)V");
        jobjLabel = (*env)->NewObject(env,JLabelClass,mid,"Hello World");
      At line:
       jobjLabel = (*env)->NewObject(env,JLabelClass,mid,"Hello World");
      Main Thread exits with error code 1. I am sure that this line is true but I didn't find problem.

      Are there any methods to find errors before program exit?