Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2041700 | 1.3.1_02 | Alex Sultanov | P4 | Resolved | Fixed | 02 |
Our Java Beans do not work correctly if they are packed with
ActiveX-Packager.
We created swing based beans with JDK 1.3 and packed them with the Sun
ActiveX-Packager.
Then we build ActiveX controls from the typelibraries with MSVC++ 6.0.
Testing the controls in a MSVC++ MDI application the controls show some
strange behavior.
If the MDI Child regaines the focus no more key stroke reaches the
control. The control renders the focus correct and the focus can be set
on subcomponents inside the control by the mouse.
Our controls work fine in a pure Java application.
An example is attached.
To get test this to work:
customize the paths in file dndtest\java\ActiveX\DnD2ListPanel.reg
* beans.ocx (e.g. C:\Programme\JavaSoft\JRE\1.3\bin\)
* dndtest.jar
* DnD2ListPanel.tlb
* s:\java\activex
- regedit DnD2ListPanel.reg.
- Run dndtest\mditest\Debug\mditest.exe.
If the MDI does not containe anything please resize it.
If the list does not appear in the MDI panel then the application will rebuilding.
(1) Remove the registration of the bean with WUnregBean in plugin directory.
(2) Use the Packager to register the bean and create the DnD2ListPanel.reg and DnD2ListPanel.tlb files in dndtest\java\ActiveX. (make sure the register is ticked)
(3) cd dndtest\mditest
delete dnd2listpaneldispatch.cpp
dnd2listpaneldispatch.h
(4) Create the C++ dispatch classes we used M$ VC++ 6.0. There s a
menu entry in the "Project" menu that let you add files to the current
project. That menu item has a submenu called "Components and controls.." (or
something like that). Clicking on that menu item brings up a dialog box. In that
dialog double click on "Registered AciveX controls". There you should find an
entry "DnD2ListPanel Bean Control". Insert this control in the project.
(5) Change in the CChildFrame::OnCreate method the following line
m_list2.CreateControl(_T("{1E589CF0-01C2-11D5-9C01-00105ACD1A9D}"),
....
Instead of {1E....9D} you have to copy the registry key from the
DnD2ListPanel.reg created in step 2
(6) Rebuild the application (Rebuild all).
(Note I had a problem here I had to remove the refernce to header and code.
Projects-->sSettings
mditest--->Header -- exclude dnd2listpaneldispatch.h
--->Code --- exclude dnd2listpaneldispatch.cpp
)
When the build gets under way you will get an error saying that the dnd2listpaneldispatch.h is missing.
Change the code affected in the error to
dnd2listpaneldispatch1.h this will then compile.
Now you should be able to run the application in the visual studio.
If the mdi child shows no content just play around and resize the mdi child a
little bit.
(7) To readjust our problem: switch between the applications. After
switching back to the test application it will not react on any keyboard input. This means you cant set the list selection with the keyboard anymore.
ActiveX-Packager.
We created swing based beans with JDK 1.3 and packed them with the Sun
ActiveX-Packager.
Then we build ActiveX controls from the typelibraries with MSVC++ 6.0.
Testing the controls in a MSVC++ MDI application the controls show some
strange behavior.
If the MDI Child regaines the focus no more key stroke reaches the
control. The control renders the focus correct and the focus can be set
on subcomponents inside the control by the mouse.
Our controls work fine in a pure Java application.
An example is attached.
To get test this to work:
customize the paths in file dndtest\java\ActiveX\DnD2ListPanel.reg
* beans.ocx (e.g. C:\Programme\JavaSoft\JRE\1.3\bin\)
* dndtest.jar
* DnD2ListPanel.tlb
* s:\java\activex
- regedit DnD2ListPanel.reg.
- Run dndtest\mditest\Debug\mditest.exe.
If the MDI does not containe anything please resize it.
If the list does not appear in the MDI panel then the application will rebuilding.
(1) Remove the registration of the bean with WUnregBean in plugin directory.
(2) Use the Packager to register the bean and create the DnD2ListPanel.reg and DnD2ListPanel.tlb files in dndtest\java\ActiveX. (make sure the register is ticked)
(3) cd dndtest\mditest
delete dnd2listpaneldispatch.cpp
dnd2listpaneldispatch.h
(4) Create the C++ dispatch classes we used M$ VC++ 6.0. There s a
menu entry in the "Project" menu that let you add files to the current
project. That menu item has a submenu called "Components and controls.." (or
something like that). Clicking on that menu item brings up a dialog box. In that
dialog double click on "Registered AciveX controls". There you should find an
entry "DnD2ListPanel Bean Control". Insert this control in the project.
(5) Change in the CChildFrame::OnCreate method the following line
m_list2.CreateControl(_T("{1E589CF0-01C2-11D5-9C01-00105ACD1A9D}"),
....
Instead of {1E....9D} you have to copy the registry key from the
DnD2ListPanel.reg created in step 2
(6) Rebuild the application (Rebuild all).
(Note I had a problem here I had to remove the refernce to header and code.
Projects-->sSettings
mditest--->Header -- exclude dnd2listpaneldispatch.h
--->Code --- exclude dnd2listpaneldispatch.cpp
)
When the build gets under way you will get an error saying that the dnd2listpaneldispatch.h is missing.
Change the code affected in the error to
dnd2listpaneldispatch1.h this will then compile.
Now you should be able to run the application in the visual studio.
If the mdi child shows no content just play around and resize the mdi child a
little bit.
(7) To readjust our problem: switch between the applications. After
switching back to the test application it will not react on any keyboard input. This means you cant set the list selection with the keyboard anymore.
- backported by
-
JDK-2041700 Problem with JavaBeans AciveX controls Focus problem
-
- Resolved
-
- duplicates
-
JDK-4300803 Swing Components in Bean - ActiveX Controlls don't regain focus
-
- Closed
-
- relates to
-
JDK-4487403 JavaBeans ActiveX Popup windows are not displayed on correct screen position.
-
- Resolved
-
-
JDK-4487415 ActiveX Popup windows still remains on screen when bridged Bean looses focus.
-
- Resolved
-
-
JDK-4487409 JavaBeans ActiveX Modal dialogs are only modal to the VM.
-
- Closed
-
-
JDK-4487400 Problems with JavaBeans ActiveX controls Dead Lock
-
- Closed
-
(1 relates to)