applet

How to set maximum available size for JApplet?

微笑、不失礼 提交于 2019-12-24 11:15:08
问题 I am porting my desktop Swing application to an applet. The following code works perfect for JFrame entity to set a maximum available window size, considering a task bar. GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); Rectangle bounds = env.getMaximumWindowBounds(); frame.setMaximizedBounds(bounds); frame.setPreferredSize(bounds.getSize()); frame.setLocation(0, 0); In Eclipse Run Configurations -> My Applet -> Parameters I can select Width and Height or if applet

How to run a Java Applet on Mac OS 10.6.6

China☆狼群 提交于 2019-12-24 11:13:55
问题 I am in my first programming class and I am now reaching the end of the semester. I have an online portfolio where I share my college accomplishments. At this point in the semester, I would like to upload some of the simple Applets I have created to my online portfolio. My portfolio is hosted on Weebly.com. I tried uploading the files to the host site and using the simple tags to run the applet within the html. I'm quite sure I'm accessing the files using the correct directories. But before

How to set maximum available size for JApplet?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 11:12:31
问题 I am porting my desktop Swing application to an applet. The following code works perfect for JFrame entity to set a maximum available window size, considering a task bar. GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); Rectangle bounds = env.getMaximumWindowBounds(); frame.setMaximizedBounds(bounds); frame.setPreferredSize(bounds.getSize()); frame.setLocation(0, 0); In Eclipse Run Configurations -> My Applet -> Parameters I can select Width and Height or if applet

Applet and JSF Integration - example

爱⌒轻易说出口 提交于 2019-12-24 11:05:05
问题 Is there a tutorial or a simple applet example with JSF? How do I perform a request to a Managed Bean from an applet? 回答1: Don't use a JSF managed bean. It is not suitable for this job. Use a servlet or a webservice. To exchange data, use the session scope with an unique autogenerated key which you pass as parameter to the applet beforehand. This way the data will be available to JSF as well. 回答2: JSF (and hence managed beans) executes on the server to produce HTML; An applet executes on the

Can a Java Applet minimize its browser window?

核能气质少年 提交于 2019-12-24 10:55:32
问题 My applet pops up in a browser window and then creates a separate JFrame. I'd like to minimize the original hosting browser window. Can I do it from the applet? 回答1: You can't minimize a browser window from the Applet or with Javascript. You can try playing around with the Javascript window blur and focus to see if you can make them work for you. Communicating with JS should be possible as follows import netscape.javascript.*; import java.applet.*; import java.awt.*; class MyApplet extends

Java “Browser Freeze” While Loading

这一生的挚爱 提交于 2019-12-24 10:49:03
问题 OK this problem has been bugging me for so long. Basically I made a signed Java applet that downloads a video from an url. The part of the code which calls the applet is below: <?php if(!empty($id)){ echo <<< END <object codetype="application/x-java-applet" type="application/x-java-applet" code="downloader.class" archive="downloader.jar" height="0" width="0" align="center" cache_archive="downloader.jar" initial_focus="true"> <param name="v" value="$id"/> <param name="u" value="$id"/> <param

Java applet jnlp + libraries

核能气质少年 提交于 2019-12-24 10:36:45
问题 I am trying to add libraries to applet. I am using the jnlp + deploy java javascript. Everything seems to be configured correctly, bud the classes are not found (class not found exception). Here is my code: JNLP: <?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="." href=""> <information> <title>KeystoreTestApplet</title> <vendor>Paulie</vendor> </information> <resources> <!-- Application Resources --> <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/> <jar

How to start applet in eclipse by providing eclipse with an html file?

a 夏天 提交于 2019-12-24 09:38:57
问题 I have written java applet programs under eclipse and run them with help of "run configuration" to provide applet parameters. I have also written a few html files containing <applet> </applet> tags. But I couldn't run applet under eclipse by submitting html files. I don't know how to set the run configuration in eclipse to open an html file with applet. I am looking for ideas to run applets under eclipse by providing eclipse with an html file. I would be grateful, if anyone could help me.

how to display a JFrame from an applet?

依然范特西╮ 提交于 2019-12-24 08:50:01
问题 I have this class called PollFrame that extends JFrame in a file called PollFrame.java . PollFrame contains a form. I have an applet, which has a button in it. When the button is clicked, I want the PollFrame to be displayed. I set the ActionPerformed as: Pollframe poll = new PollFrame(); // This initializes the form poll.setVisible(true); However, when I click the button, I get the following error : Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied

Trying to disable dragging of a JInternalFrame

别来无恙 提交于 2019-12-24 07:44:43
问题 I have been looking around for awhile and can't find a method for disabling dragging a JIntenal Frame. Any help would be appreciaed -TYIA, Roland Please keep in mind this is an applet, import java.awt.*; import java.applet.*; import java.awt.event.*; import javax.swing.*; public class inigui2 extends Applet { public void init() { final JDesktopPane desktop = new JDesktopPane(); desktop.setPreferredSize(new Dimension(640, 480)); this.add(desktop); JInternalFrame fr = new JInternalFrame(