System.Windows.Forms.UserControl as JPanel parent?

System.Windows.Forms.UserControl as JPanel parent?

Post by YWxle » Sat, 12 Feb 2005 01:41:06


Does anyone know if it is possible to add a JPanel to a
System.Windows.Forms.UserControl, or other WinForms container?

(Trust me, I have a good reason for doing this!)

I tried the following, but of course last line does not compile:

<code>
using javax.swing;

public partial class myUserControl : UserControl
{
public myUserControl()
{
InitializeComponent();

JPanel jp = new JPanel();
this.Controls.Add(jp); // doesn't compile!
}
}
</code>
 
 
 

System.Windows.Forms.UserControl as JPanel parent?

Post by Lars-Inge » Sat, 12 Feb 2005 01:52:37


Sorry you can't mix Windows Forms with Java UI. You have to choose one of
them.


Regards,
Lars-Inge Tnessen

 
 
 

System.Windows.Forms.UserControl as JPanel parent?

Post by YWxle » Sat, 12 Feb 2005 02:13:04

Not the answer I was hoping for, but thanks for the reply!

I'm trying find a way to deploy a J# application in Internet Explorer.
I could use an Applet to do this, but then I would also need the
J# Browser Control on each client, which is not practical in my case.
So I was hoping I could just embed my JPanel in a WinFrom, put it all in
an assembly, and reference it in my html page.

I'd greatly appreciate any suggestions!
thanks
 
 
 

System.Windows.Forms.UserControl as JPanel parent?

Post by George Bir » Mon, 14 Feb 2005 05:44:47

> I'm trying find a way to deploy a J# application in Internet Explorer.

have suggested WinForms interoperability with Swing to J# team for sometime
now so keep your fingers crossed. Have you checked VJ#2005 beta1 express
edition in case they have any support for such a thing there?

btw, with J# redistributable being separate from .NET runtime
redistributable currently (this will change in 2.0 I think), your clients
would still need to install J# redistributable (also think it's not
autoinstallable via the web)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis < XXXX@XXXXX.COM >
Microsoft MVP J# for 2004, 2005
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime controls (Delphi & ActiveX: VB, PowerPoint, .NET)
+ Plugs (InterProcess/Internet communication)
+ TranXform (VB6 form to ASP.net WebForm convertion)
http://www.yqcomputer.com/
+ Robotics
http://www.yqcomputer.com/ ~robgroup
........................................................................
 
 
 

System.Windows.Forms.UserControl as JPanel parent?

Post by YWxle » Wed, 16 Feb 2005 04:17:08


I tried it with VS2005 beta1, no luck. Have not tried beta1 express.