286 Posted Topics
Re: you need to type extends [name here] and then you can retrieve information between the 2 and if you need any more help post what you have so far. | |
I am making a game, but my buttons don't seem to be working. When I click in a certain area (where the button is) a screen should pop up. It doesn't. Please help. [code] // The "VirusMania" class. import java.applet.*; import java.awt.*; import javax.swing.Timer; import java.awt.event.*; public class VirusMania extends … | |
I received this error when I tried uploading my game to a website (yes I found one). Java Plug-in 1.6.0_15 Using JRE version 1.6.0_15-b03 Java HotSpot(TM) Client VM User home directory = C:\Users\Adam ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this … | |
I would like to make it so that when a character (picture or shape) moves it leaves a trail behind it that keeps getting more transparent. how would i start. If you jump the trail should follow up then down. Can anyone help me? Thanks | |
Hello Everyone. I am trying to use a string to set a color. i have tried Color is the string which says a color like black or red [code] g.setColor (Color.color); [/code] and [code] g.setColor (Color."color"); [/code] lets say the string color was red it should have this effect [code] … | |
Re: you could use a for loop with an array. start it at 10 and then check if the number is < 100 && > 10 and then store it. | |
Re: you could use the [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html"]math class[/URL] | |
Re: so many ors instead try using ands [code] if (x1 + length of bullet >= ranx && y1 + bullet height / 2 >= rany && y1 + height of bullet / 2 <= rany + height of monster){ ranx += 5000; } [/code] you check if the x of … | |
My game that I made works correctly when I run it in the window from my IDE, but when I run it from a browser the game buttons don't animate. can anyone tell me why it's not working? another problem. When [I]New Game[/I] is pressed in the IDE window a … | |
Re: This is the old code I posted [code] // The "SpaceShoot" class. import java.applet.*; import java.awt.*; import java.awt.event.*; public class SpaceShoot extends Applet implements KeyListener { int x = 10, dx, y = 10, dy, a = 0, by = 47, bx = 95; char m; private Image dbImage; private … | |
Hello. I am having trouble with my menu and buttons (which are just pictures that change when you scroll over them). One of my buttons works perfectly, but when I coded the rest in the same way (at least I think so) they dont work. Sorry for the long code. … | |
I imported a picture onto another picture and I am wondering how to get rid of the white around the smaller picture. | |
when the space key is pressed then the menu apears, but when you press the resume button (cont) then the menu should dissapear, but it doesn't. please help. Thanks [code]// The "ArrowKeys" class. import java.applet.*; import java.awt.*; import java.awt.event.*; public class ArrowKeys2 extends Applet implements KeyListener, Runnable, MouseListener, MouseMotionListener { … | |
My bullet animation does not work. Can anyone help. Thanks [code]// The "SpaceShoot" class. import java.applet.*; import java.awt.*; import java.awt.event.*; public class SpaceShoot extends Applet implements KeyListener { int x = 10, dx, y = 10, dy, a = 0, by = 47, bx = 95; char m; private Image … | |
I have a problem with this code and I do not know what is causing it. [CODE]// The "ArrowKeys" class. import java.applet.*; import java.awt.*; import java.awt.event.*; public class ArrowKeys2 extends Applet implements KeyListener, Runnable { int x = 50, dx, y = 50, dy, a = 0, score, total, locx, … | |
is there an option where you can opt out a certain color (green, red, blue, etc.) and replace it with a different picture. lets say I had a stick figure with a blue background and I had a mountain as a background image would there be a way to take … | |
I am having some trouble on inheritance in java. I am just testing how it works. I have a file that produces a random number in a folder called number. I have a file that calls the RandomNumber code that is in the main folder. I am wondering how I … | |
I am trying to center a simple navigation menu (horizontal). this is my script so far: [code] <head> <title>Home</title><link rel="menu" href="menu.css" type="text/css" /> <style type="text/css"> body {background-image:url('backg.jpg');} .center body{ text-align:center; /*centers for IE5*/ #menu_box{ text-align:center; /*overrides the centering from above*/ width:675px; /*5 menu items at 135px width (8px padding + … ![]() | |
Re: you can use this code (css) [code] <style type="text/css"> body {background-image:url('BACKGROUNDHERE.FILETYPE');} </style> [/code] make sure you have the picture in the same file as the page.html or if you have a picture called pic.jpg in an images folder then the code should look something like this: [code] <style type="text/css"> body … | |
my webpage is not displaying correctly in some of the browsers like firefox, chrome, opera and safari; yet it dispays fine in explorer, avant, maxathon. how could I fix this. the only problem is that the second background doesn't go under all of the text. here is the code: [code] … | |
Re: put in a max value and set the first number entered in the max and then compare the numbers in the array to the max value and put in an if statement: [CODE]if (max < array[i]){ max = array[i] }[/CODE] | |
Re: from the languages I know the array always starts at 0 so make sure that is you want to swap out the 2nd element then you need to put arrayname[1] and then replace it with the number you want | |
I tried putting in a margin (bottom) into the [code] .news { width:800px; height:auto; margin-left:30px; margin-right:30px; margin-bottom:50px; } [/code] but the blue background that I have here [CODE] .newsbg{ width:740px; height:auto; background-color:rgba(142,229,238,0.5); } [/CODE] still goes to the end of tile background. I would like there to be a space … | |
Re: it seems like you didn't define the [I]ImageIcon[/I] variables instead you just used [I]Icon[/I] | |
I am wondering how to make the red aquare jump around in the script. This is a menu. I would like the red squareto jump around every 1 or 2 seconds (doesn't have to be exact). Right now I have it when someone moves the mouse but I woule like … | |
I have started making a calculator. There are buttons and a screen where the numbers should how up. Except I dont know how to program the larger numbers so when someone types in a '5' then a '2' then a '7' the number becomes 527 instead of a 5 then … ![]() | |
I am in a java programming class but my teacher doesn't teach anything so could someone please explain to me how to import a picture into the applet and give me an example of a simple script that just imports a picture. I have learned how to use the mouse … | |
When I run this loading bar script the bar doesn't load and then it loads to the maximum. how come this load bar doesn't work thanks for the help. [code] // The "LoadBar" class. import java.awt.*; import hsa.Console; public class LoadBar { static Console c; // The output console public … | |
I have an error when I add in another ball. The colors are the same how would it be possible to change the colors of the balls seperately when they are on the same screen. When I added the other ball in when one hit the edge the second one … | |
[code] // The "ChoseYourOwnStory" class. import java.awt.*; import hsa.Console; public class ChoseYourOwnStory { static Console c; // The output console public static void main (String[] args) { c = new Console (); String start = ("yes"); // assignment 1 while (start.equals ("yes")) { c.println ("A high ranking thug comes walking … | |
Re: for text you can try [code].setTextColor ([COLOR HERE]);[/code] | |
Re: Sorry but we are [B]NOT[/B] handing out scripts. | |
The [COLOR="Red"]red[/COLOR] is where the problem is: Thanks for the help. [code] // The "ChoseYourStory" class. import java.awt.*; import hsa.Console; public class ChoseYourStory { static Console c; // The output console public static void main (String[] args) { c = new Console (); int move; String start = ("yes"); int … | |
[code] c = new Console (); int lvl = 1; double exp = 0; int x = 1; double monsterhp; int monslvl = 1; int a = 1; while (a == 1) { int lvlup = 10 + (lvl * 40); if (exp >= lvlup) { lvl = lvl + … | |
Re: [QUOTE=churva_churva;1347965]I already make a web page and I want to upload it for so that it would be accesible for everyone..but i don't know how any suggestion.. Any guys here that know where should I upload my website for free..[/QUOTE] You can post it up on [URL="http://www.freewebhostx.com"]www.freewebhostx.com[/URL] That is the … | |
Re: you would start off by making them type in the salary and the number hours and if the number was greater then 45 then you would subtract 45 from the total hours worked then you would multiply the pay by 1.5. then you would add the pay for the hours … |
The End.