japplet

How to visualize a neo4j graph

我只是一个虾纸丫 提交于 2019-12-18 17:03:02
问题 I want to visualize a neo4j embedded graph within my JAVA application. I have read the Max De Marzi's Graph Visualization Blog but I could not find anything in JAVA but only ruby and C++ May you help me to find a guide to install something easy to visualize my graph? I need just to see nodes and relationships. P.S. I do not want to use external programs. As a result I do not like: linkurio neoclipse webadmin gephi etc. 回答1: What do you mean by visualize in Java application? If you wish to

How can I display an image in the Applet?

不打扰是莪最后的温柔 提交于 2019-12-18 12:42:26
问题 I have an image and I want to display it in the applet, The problem is the image wont display. Is there something wrong with my code? Thanks... Here's my code : import java.applet.Applet; import java.awt.*; public class LastAirBender extends Applet { Image aang; public void init() { aang = getImage(getDocumentBase(), getParameter("images.jpg")); } public void paint(Graphics g) { g.drawImage(aang, 100, 100, this); } } 回答1: aang = getImage(getDocumentBase(), getParameter("images.jpg")); I

How can an applet Read/Write files on the local file-system?

ε祈祈猫儿з 提交于 2019-12-18 09:56:27
问题 In Java JApplet, file read and write operations did not work in webrowser. When I click "Ok" button, it should be write some file in our local path. But it shows below error. How to resolve this error? java.security.AccessControlException: access denied ( "java.io.FilePermission" "D:/.../.html" "write") 回答1: By default whenever a applet tries to access local resources, its denied as a part of security layer. You have following options if you need to access using applet: Sign your applet using

Graphics flashing in JApplet

*爱你&永不变心* 提交于 2019-12-18 09:52:20
问题 I know that this has been asked many times before, but every time I visit the question thread and excecute the posed solution, it still doesn't work for me. So before I create any confusion, the problem I have is that the screen I draw is constantly flashing, this is because every time I draw the screen, I clear the screen with a completely white filled rectangle, the things I draw over the rectangle will flash. Here is my code: import java.awt.*; import java.awt.event.*; import javax.swing.*

Play audio clips sequentially in JApplet

≯℡__Kan透↙ 提交于 2019-12-18 09:26:57
问题 I'm trying to play audio clips sequentially, but they all play at the same time. I'm not sure what I am doing wrong. Could you Please help. I'm using JFrame, and this code is giving runtime error. AudioClip click; AudioClip click2; URL urlClick1 = DisplayMath.class.getResource("number11.wav"); click = Applet.newAudioClip(urlClick1); URL urlClick2 = DisplayMath.class.getResource("number12.wav"); click2 = Applet.newAudioClip(urlClick2); click.play(); click.notify(); try { click2.wait(); } catch

Play audio clips sequentially in JApplet

六月ゝ 毕业季﹏ 提交于 2019-12-18 09:25:52
问题 I'm trying to play audio clips sequentially, but they all play at the same time. I'm not sure what I am doing wrong. Could you Please help. I'm using JFrame, and this code is giving runtime error. AudioClip click; AudioClip click2; URL urlClick1 = DisplayMath.class.getResource("number11.wav"); click = Applet.newAudioClip(urlClick1); URL urlClick2 = DisplayMath.class.getResource("number12.wav"); click2 = Applet.newAudioClip(urlClick2); click.play(); click.notify(); try { click2.wait(); } catch

Applet/JNLP on Java 11 migration

爱⌒轻易说出口 提交于 2019-12-18 07:06:09
问题 I have an application that runs under Java/JNLP applet and I would like to migrate to Java 11. As you know the applets and JNLP will disappear from Java 11. The goal is to keep my old code and remove the packages that contain the applets, is it possible to do this migration without switching to a new technology? 回答1: Yes and No. Yes you can keep your java business logic and data handling code (presumed you did a clean separation of your application layers). E.g. just convert to a standalone

Embed a 3rd-party JApplet in a Swing GUI & pass it parameters

笑着哭i 提交于 2019-12-17 06:51:27
问题 There's a third-party applet that I'd like to embed in my Swing application. Basically, I'd like it to be just another panel. This applet makes use of many parameters, e.g. final String config_filename = getParameter(XXX); I've seen lots of documentation about how to send parameters values via HTML, but how do you do it via code (or perhaps property files)? Any help would be appreciated! 回答1: Implement an AppletStub & set it as the stub of the applet instance. E.G. /* <applet code=

Adding image in JApplet

限于喜欢 提交于 2019-12-13 21:17:35
问题 ImageIcon icon= new ImageIcon("a.gif"); JLabel jLabel1=new JLabel(icon); jLabel1.setVisible(true); card1.add(jLabel1); I am a newbie to Java and I am facing a problem to add image in a panel in applet. My image is in the same folder. My applet is visible without any problem but only image is not displayed. 回答1: public void init() URL imageURL = new URL(getDocumentBase(), "a.gif"); Image image = getImage(imageURL); ImageIcon icon = new ImageIcon(image); // ... The ImageIcon constructor that

Java Applet Polygon array

痴心易碎 提交于 2019-12-13 09:39:49
问题 I have a functional program that gathers coordinates with each mouse click and then draws a polygon using those coordinates. I added a feature so that when you are done drawing your polygon and it is filled in, you can then erase the screen and start again with a new shape. What I am having trouble with is figuring out a way to reset the coordinate values. What I have now is within my actionPerformed method I Zero out my two arrays (XCoordinates and YCoordinates). Now the user can start fresh