using visual library in java applet

Hi,

I try to develop an web application which is use the java applet. So, I just want to ask, is it possible to use the netbeans visual library in the java applet? If not, which library must be used this kind of appliacation and what is the efficent developmen environment (netbeans, java studio creator ?)

best regards,

Ufuk Utku Turuncoglu

ITU, Informatics Institute

HPC Lab

[413 byte] By [weathermana] at [2007-11-27 4:59:15]
# 1

> Hi,

>

> I try to develop an web application which is use the

> java applet. So, I just want to ask, is it possible

> to use the netbeans visual library in the java

> applet? If not, which library must be used this kind

> of appliacation and what is the efficent developmen

> environment (netbeans, java studio creator ?)

>

> best regards,

>

> Ufuk Utku Turuncoglu

> ITU, Informatics Institute

> HPC Lab

Depends on the format of the library; what are names the files that comprise this library?

(T)

tswaina at 2007-7-12 10:15:27 > top of Java-index,Desktop,Core GUI APIs...
# 2
the name of the jar file is org-netbeans-api-visual.jar and it contains visual library class. do you know any other method than applet that implements visual library in web application?
weathermana at 2007-7-12 10:15:27 > top of Java-index,Desktop,Core GUI APIs...
# 3

Add org-netbeans-api-visual.jar into your jar/classpath and you should be

OKassuming your Applet is signed/jar packed, you will have to jump through

some hoops to get rg-netbeans-api-visual.jar accessible from your main

jar.

Namely....

class YourClass

{

void copyResourceFromJarToExtDir(String tResource)

{

InputStream dllInputStream = getClass().getClassLoader().getResourceAsStream(tResource);

fileSeparator = System.getProperty("file.separator").charAt(0);

String extDir = System.getProperty("java.home")+fileSeparator+"lib"+fileSeparator+"ext";

File outFile = null;

try

{

BufferedInputStream binStream = new BufferedInputStream(dllInputStream);

outFile = new File(extDir+fileSeparator+tResource);

BufferedOutputStream boutStream = new BufferedOutputStream(new FileOutputStream(outFile));

System.out.println("saveing to"+outFile.toString());

int b = -1;

while((b = binStream.read()) != -1)

{

boutStream.write(b);

}

binStream.close();

binStream.close();

boutStream.flush();

boutStream.close();

}

catch(Exception e)

{

e.printStackTrace();

}

}

}

To summarize pack the rg-netbeans-api-visual.jar into your Applets main jar and call copyResourceFromJarToExtDir("rg-netbeans-api-visual.jar");

In your Applet.init() and you will be able to access the rg-netbeans-api-visual.jar

directly.

Good Luck!

(T)

tswaina at 2007-7-12 10:15:27 > top of Java-index,Desktop,Core GUI APIs...