![]() |
|
[C#] How do I add an applet to my form instead of a jframe - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] How do I add an applet to my form instead of a jframe (/showthread.php?tid=5825013) |
How do I add an applet to my form instead of a jframe - passwords - Apr 14, 2018 So I am working with a project that involves ikvm Now it works great and everything until I realized I can't design and cuztomize the JFrame. So what I wanted to do was to, instead of adding the applet to a JFrame, add it to a Windows Form. I am not sure if this ikvm allows that Because with Java you would just Code JFrame frame = new JFrame("OSLoader");Magic line being Code frame.add(applet);How do I add the applet to a Windows form? Maybe inside a panel or something. The jar file I am using (if it's even needed for this) is this one, a runescape jar Current code Code private void BtnRun_Click(object sender, EventArgs e)I tried converting the applet into a .NET control since from what I saw on the docs, a applet has to be a control because frame or JForm.add takes a control as a parameter. Code Control c = (Control)classLoader.loadClass("client").newInstance();But that threw me this error
RE: How do I add an applet to my form instead of a jframe - Hawk HF - Apr 14, 2018 The error tells you everything you need to know. You're trying to cast an object of type "client" to Control. RE: How do I add an applet to my form instead of a jframe - gigajew - Apr 19, 2018 On another note, Jagex added some code that makes the client fail to load if the size hasn't been set already, it'll throw an exception |