all groups > vj# > february 2005 >
You're in the

vj#

group:

System.Windows.Forms.UserControl as JPanel parent?


System.Windows.Forms.UserControl as JPanel parent? alex
2/10/2005 8:41:06 AM
vj#:
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>

Re: System.Windows.Forms.UserControl as JPanel parent? alex
2/10/2005 9:13:04 AM
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
Re: System.Windows.Forms.UserControl as JPanel parent? Lars-Inge Tønnessen [VJ# MVP]
2/10/2005 5:52:37 PM

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


Regards,
Lars-Inge Tønnessen

Re: System.Windows.Forms.UserControl as JPanel parent? George Birbilis [MVP J#] [9880]
2/12/2005 10:44:47 PM
[quoted text, click to view]

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 <birbilis@kagi.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.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
.........................................................................

Re: System.Windows.Forms.UserControl as JPanel parent? alex
2/14/2005 11:17:08 AM

[quoted text, click to view]

I tried it with VS2005 beta1, no luck. Have not tried beta1 express.
AddThis Social Bookmark Button