How do you get a Java Applet to force your browser to load a URL?
Like when the user clicks a button, then the Applet tells the browers to go to another page. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend...
I have an update on that. I fixed the initial problem, but now it won't print the card I drew, just the last space I moved to. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling...
At http://www.geocities.com/gt500fomoco/code/document.html is an explanation of what I was supposed to do.
My code is at http://www.geocities.com/gt500fomoco/code/Candy.java
My problem is obvious. If you try to run it, it seems to have problems matching the card you have drawn to a space on...
Can't use switch statements. I haven't learned them yet.
No, I'm not puting it in an Applet. It's just a good old fashioned MS-DOS program. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity...
Thanks, but that just confused me...
Although I fixed the problem anyway. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy
I fixed that problem...
Although now I have a new problem. The double weight won't carry it's variable over. I know this should work, here is the code for the class:
class Planet {
public Planet(String name, double weight) {
}
public int convert(int eweight) {
int...
I am writing a program that calculates your weight on another planet. I have to use the Planet class, but it doesn't work right. Here is the code:
public class Weight {
public static void main(String[] args) {
ConsoleReader keyboard = new ConsoleReader(System.in)...
Can anyone give me the JavaScript code for a simple navigation bar for the top of my webpage that has pulldown menus and is really easy for someone why doesn't know JavaScript to modify? X-)
Thanks. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink...
Did you try running that? It just maked the pie chart draw lines untill in becomes a filled in, almost 3D circle. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows."...
I have a program that draws a pie chart with 4 slices. It draws the info from the Applet tag of the HTML file. I need it to draw 5 slices. Here is the code...
Java...
import java.applet.Applet;
import java.awt.*;
import java.awt.geom.*;
public class PieChart extends Applet {
public void...
That just caused it to not print anything. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy
I got my program to work, but it prints the image on it's side. I need to know which variables I've got in the wrong places. Here is my code, the problems (I think) are in class Building. Here is the code...
import java.applet.Applet;
import java.awt.*;
import java.awt.geom.*;
import...
Thanks! It compiles! X-) "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy
Here is my code, maybe you can find what I am doing wrong...
import java.applet.Applet;
import java.awt.*;
import java.awt.geom.*;
import java.util.*;
import javax.swing.*;
public class Skyline extends Applet {
public void init() {
setBackground(Color.black);
}
public...
From the Applet tag of the HTML file. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy
I already tried it, and it didn't work. I need to know if there's something special I need to do to get it to work. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows."...
Can I use the getParameter() method in a class? "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling Windows: by some British guy
Are you trying to keep people from downloading CLASS files off a website and decompiling them to get code? Or are you trying to keep people at the company you work for from tampering with your code?
If it's the second, then create a folder, then create one inside it, and one inside it, and so...
wushutwist
I thought that might be the case, but since I have no real idea, I kept my opinion to myself. "and everything under the sun is in tune
but the sun is eclipsed by the moon." --Pink Floyd: Eclipse
"I'm going to spend eternity
reinstalling Windows." --Reinstalling...
OK, I tried it and it worked. Now I need help drawing the buildings. Here is my updated code:
import java.applet.Applet;
import java.awt.*;
import java.awt.geom.*;
import java.util.*;
import javax.swing.*;
public class Skyline extends Applet {
public void init() {...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.