Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Tatiana_Konstantinova

Greenhorn
+ Follow
since Nov 28, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tatiana_Konstantinova

html files doesn't require codebase - just write the URL ,like I've already shown you:
=====
URL url;
String link="http://www.yoursite.com/yourfile.html";
try {
url= new URL (link);
}
catch (MalformedURLException e) {}
......
......
String window;
/* "window" can be initialized as "_blank", "_top","_left,"_right", "_bottom" or simply the name of the necessary frame window*/
......
getAppletContext().showDocument(url,window); /* open url in necessary window*/
19 years ago
The same way - getDocumentBase()
19 years ago
I think that it's simply restricted to use PrivilegeManager and to write any data to the files or to create any new files from an applet, you can do it only from an application.
19 years ago
URL url;
String link="http://www.yoursite.com/yourfile.html";
try {
url= new URL (link);
}
catch (MalformedURLException e) {}
......
......
String window;
/* "window" can be initialized as "_blank", "_top","_left,"_right", "_bottom" or simply the name of the necessary frame window*/
......

getAppletContext().showDocument(url,window); /* open url in necessary window*/


19 years ago
But you didn't defined canvas size before. For example if you define
Circle circle = new Circle(new Point(20, 35), 50);
after this you can write
Dimension dem = circle.getSize();
You also can use getSize() ini init method of the main applet,
but here is a new class and component is not initialized.
19 years ago
Please post the full program text. Possible cause may be that Java doesn't allow to write anything to hard disk from applets.
19 years ago
As I remember, getSize() is a member of class Graphics, so you can use it only with Graphics.
19 years ago