Thank you, but I just started working with applets for the first time and finally got to understand something about a Canvas and Applet so if I have to switch I will have to do all my research all over again. My professor told me it would be the easiest way for me if I just used Applet and Canvas, because the result doesn't have to be very fancy.
I've already done pretty much and only need to know how to position a Canvas, and the rest of...
User Profile
Collapse
-
placing/adding canvas on/to applet
Hello,
lately I've been trying to make an applet that has a background image and a couple of canvas objects on it holding an image each.
I created the class ImageCanvas which extends Canvas adn draws a picture in the canvas.
Next I have to place the canvas on the applet and there I got stuck because I don't know how to control the position of every canvas. How can I put a canvas exactly there where I want it to be?
... -
Hey, in order to help you, you should paste your code here so I know what you've been exactly trying to do....Leave a comment:
-
foleyflint replied to Scanner problems Easy for people who know Java (I dont!)- Need Immediate Help!!!in JavaI gave you the Scanner Code, because you definately need to chang that one....Leave a comment:
-
I know how to use the Scanner. THis is my code:
...Code:try { String file = "saldo_overzicht.txt"; Scanner input = new Scanner(new FileReader (file)); int value = 0; value = input.nextInt(); /** Read first number from each line: day of month */ while(data_days[countdays] != 31 && data_months[countmonths] != 12)Leave a comment:
-
What I would recommend to you is to download the Java Machint from www.sun.com, the version without NetBeans. After you've done that, you should download BlueJ, which is a compiler. Search for it in Google with 'BlueJ' and you'll probably get the good website.
Next you'll need a book: Please do not buy Java Concepts by Cay Horstmann. It's a silly book and it's going way to fast. I will have to buy some other book too very soon. I'm thinking...Leave a comment:
-
foleyflint replied to Scanner problems Easy for people who know Java (I dont!)- Need Immediate Help!!!in Java_______________ _______________ _______________ _______________ ______
What is wrong with this and how do I rewrite it to produce the correct output??
if (total == MAX)
if (total < sum)
System.out.prin tln ("total == MAX and is < sum.");
else
System.out.prin tln ("total is not equal to MAX");
_______________ _______________ _______________ _______________ ______...Leave a comment:
-
foleyflint replied to Scanner problems Easy for people who know Java (I dont!)- Need Immediate Help!!!in JavaLet me give you an example of a Scanner Object below:
System.out.prin t("Type input: ");
Scanner reader=new Scanner(System. in);
String myText=reader.n extLine();
System.out.prin tln("Your text is: "+myText);
This way you are I think able to adjust your code and make it work.Leave a comment:
-
calculate interest from text file with Java
Hello, I'm trying to calculate the interest from a bankaccount which is displayed in a text file as followed:
9 2 345
3 3 300
etc. (there are 19 lines in total)
the first number of each line means a day, the second stands for the month and the last for the amount of money on the account.
so the first line is Februari 9th with an amount of 345.
I want to make the program read the textfile...
No activity results to display
Show More
Leave a comment: