Hello everybody,

I think it is time to start the first SDK JAVA thread. And here comes the first question:
How can I add a CameraButtonClickedEventListener in the CameraDemoJava application.
In the constructor CameraDemoJava() I have added
b = new Buttons(cameraFrame);
When I now add the CameraButtonClickedEventListener the same way that it is done in the ButtonDemoJava application
b.addCameraButtonClickedEventListener(cameraClickedEL = new ICameraButtonClickedEventListener(){
public void cameraButtonClicked(CameraButtonClickEvent evt) {
String message = "Camera Button was pressed";
JOptionPane.showMessageDialog(CameraFrame, message, "Dialog",



I recieve an error:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: unable to register button callback.btnType
at CameraDemo.CameraDemoJava.actionPerformed(
The MCA log file in the emp folder says
{S0-P2128-T1352} [BN] Button_Local::RegisterAction - Invalid Window Handle passed
{S0-P2128-T1352} [BN] BN_RegisterAction returning unsuccessful status of : ;DATA#-220

Is there anybody who knows how to add a CameraButtonClickedEventListener ?


4 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Hello everybody

I found out.
You cannot call b = new Button(CameraFrame) in the constructor CameraDemoJava().
because of the Invalid Window Handle - CameraFrame is declared static
Now I declared button as
static static Buttons b;

And in private static void createAndShowGUI(){
b = new Buttons(cameraFrame);
Now I can Start the Preview and Capture Frame by pressing the Camera Button
Okay this was not a SDK problem but Thanks anyway


Hello Steve,

I found a small error in the Example Camera Java application. It is nothing serious.
When Changing the Option ComboBox to one of the camera options the slider will change this option.
But when the Option ComboBox is changed to "Select an option" the Option Slider is still enabled. So when the Option Slider is changed an error will occur.

The simpliest way to avoid this error, is to disable the slider when the Option ComboBox is set on "Select an option"
So nothing serious, but I just wanted to let you know


Thanks Markster. I'll forward it to our developers.


Faça login para deixar um comentário.