applet

How can I check if I have that java 6 plugin 2 for applets installed?

为君一笑 提交于 2019-12-24 16:18:47
问题 Also, is creating an applet that uses the java 6 plugin 2 thing any different than creating a normal applet? 回答1: See the Java documentation for the Applet and Object tags. Especially look at the documentation of the "class ID" attribute of the object tag. You want to use a classid tag like this: classid="clsid:CAFEEFAC-xxxx-yyyy-zzzz-ABCDEFFEDCBA" where xxxx = 0016 yyyy = 0000 zzzz = 0002 and this will specify that exact version. No, specifying any specific Java version is no different than

terminating java applet thread on page unload

北城以北 提交于 2019-12-24 15:47:43
问题 I have got a problem here in terminating the threads. The problem is that I am using applet thread to access JS DOM and manipulate innerHTML of a span to right the Thread Name as the innerHTML. It works fine until I keep refreshing the page but if I dont give it a sleep of like 200ms and go to another page which dont have any applet on it, it will give me an error in firebug console: document.getElementById("userName") is null What I am suspecting is, although I send an interrupt on stop and

Applet not painting

旧巷老猫 提交于 2019-12-24 15:42:56
问题 I am having issues with my Applet not painting the required graphics. For some reason, it updates the coloring in the graphics, as you can see this when it prints, it recognizes the mouse is being moved, the graphics are not null, but it still refuses to paint. How can this be fixed? import java.awt.*; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import javax.swing.JApplet; public class GameApplet extends JApplet implements

Spawning mutiple circles and make them move

穿精又带淫゛_ 提交于 2019-12-24 15:36:28
问题 I'm trying to teach myself java and I "try" to code a little game. I have a problem and I guess the solution is very simple but I'm struggling. The basic idea is that I am controlling a circle and I want to spawn circles every 5 seconds at random locations within the boundries of my window . The circles should move towords the location of the circle that I'm controlling. Here's what I have so far: Window-Class: package TestGame; import java.awt.Graphics; public class Window extends GameIntern

java.security.properties in JNLP

自作多情 提交于 2019-12-24 14:52:27
问题 I know you ca specify a file that is going to override the java.security f java -Djava.security.properties=myProperties How can I set this parameter in a JNLP file? 回答1: Properties in JNLP file you can set using this tag: <property name="key" value="overwritten"/> But you can't set java.security.properties in JNLP. Not all properties are allowed to set in jnlp. For more info see here. Why do you need to change this property? 来源: https://stackoverflow.com/questions/34998336/java-security

httponly cookies enabled communication error applet to servlet

怎甘沉沦 提交于 2019-12-24 14:49:50
问题 We have a issue with an application running under Websphere 6.1.0.31 with the HTTPOnlyCookies setting enabled. The issue is with an Applet that makes a connection via HttpURLConnection to a Servlet. The Applet is passed the JSESSION ID from the JSP page by parameters. In the HttpURLConnect call we set the Cookie header and include the JSESSION ID. The Servlet does not use the cookie passed and will create a new session and cause an error. With HTTPOnlyCookies disabled, this works without any

Differentiate Between Robot mouseclick and human mouse click

戏子无情 提交于 2019-12-24 12:57:54
问题 I have an applet that I'm running online and I want to make sure people can't use the java Robot class to operate the applet. I know that yahoo does this on several of their game platforms and I was wondering if anyone knew how they accomplished it. 回答1: Watch mouse movement, and make sure you're not seeing "jumps" from one place to another, but movement over time instead. Sun/Oracle's J2SE tutorials show how to follow mouse movement events: http://download.oracle.com/javase/tutorial/uiswing

Embed Java Applet on GitHub Page

我们两清 提交于 2019-12-24 12:44:20
问题 I am working on a Java project that I am hosting on GitHub. I wanted to use GitHub Pages to have a page hosted on GitHub with the applet embedded. Now, I'm trying to embed an applet into the page, with the applet files hosted on GitHub on the gh-pages branch. I exported the Java applet as "exploded", so all of the class files show up in their correct hierarchy. In `index.html, I'm using this code: <section id="main_content"> <script> var attributes = {codebase: 'cubesorter/me/nrubin29

web 如何实现精准打印

梦想的初衷 提交于 2019-12-24 12:06:06
在 WEB 系统中,打印是必不可少的一个功能,但也是一个比较棘手的问题。如果完全自己开发,由于涉及浏览器的局限性、js 兼容性、稳定性等因素,往往耗时长、工作量大,最终严重影响项目周期。特别地,在 WEB 环境下,套打需求的实现时难度更大,此时需要将浏览器中呈现的 HTML 精确地打印到票据中,实现对分页位置的控制。 常用的 WEB 打印实现方式有哪些呢? 1、 利用浏览器自带的打印控件来实现 web 打印 实现方法:直接调用 IE 的打印功能或者在程序中调用 window.print() 来实现 web 打印 优势:不需要对浏览器作任何扩充 缺点: 1) 不能精确分页。 浏览器一般是根据用户设置的页面大小、web 页面的内容多少来自行决定分页位置,程序员很难控制,因为会有页脚页眉干扰。 2) 不能准确对齐边边距及打印文字。 3)不能解决连续打印 2、 使用 pdf 文件 实现原理:从服务器端下载一个 pdf 文件流,在 IE 中用 adobe 插件打开,然后用 adobe 的打印菜单进行打印 优点:可以实现精确套打 缺点:需要下载 adobe 插件 3、 采用 Applet 方式 优点:可以实现分页和精准打印 缺点:1)安装 Applet 成本巨大,一般需要下载十几 M 的文件。 2)打印报表时,需要重新向服务器检索数据,效率低。 上面的三种实现方法虽然可以解决部分 web

Self-signed applet doesn't get a full permission

╄→尐↘猪︶ㄣ 提交于 2019-12-24 11:29:54
问题 I've googled lots of links like oracle and velocity review and stackoverlow too, but still no success. The point is simple. Jar is signed using: keytool -genkey -alias signFiles -keystore compstore -keypass bca321 -dname "cn=test" -storepass abc123 jarsigner -keystore compstore -storepass abc123 -keypass bca321 -signedjar SignedJar.jar UnsignedJar.jar signFiles And it runs perfectly on local machine. But when SignedJar.jar is used like an applet via HTTP(S), even if user accepts certificate