Hi, not sure if this is the place to post, mod please move it necessary...
The problem here is that i am trying to put a java panel into a C# winform.
I am using the IKVM to convert my java class to a dll and the C# program is referencing it.
Here are the codes:
for java:
// JavaComponent.java
import java.awt.*;
import java.awt.event.*;
public class JavaComponent extends Panel {
public TextField javaTextBox;
Button btn;
public JavaComponent() {
setSize(400, 100);
setLayout(new GridLayout());
add(new Label("JavaComponent: ");
javaTextBox = new TextField(30);
btn = new Button("Send");
add(javaTextBox);
add(btn);
}
public void addActionListener(ActionListener l)
{
btn.addActionListener()l;
}
}
For C#
JavaComponent jc = new JavaComponent();
jc.setVisible(true);
The C# program compiles without errors but when runing up, it does not show the awt and gives an error of java.Lang.ClassNotFoundException occured in IKVM.Runtime.dll,
System.IO.DirectoryNotFoundException in mscorlib.dll
java.Lang.ClassNotFoundException occured in IKVM.OpenJDK.Core.dll
Can anyone help?