286 Posted Topics

Member Avatar for sirlink99

I have this code which should resize the image in the header. [CODE] #headerWrap { margin-left: auto; margin-right: auto; margin-bottom: 0; width: 90%; height: 7%; background: url('Images/header.gif') no-repeat; } img.image { width: 100%; height: 7%; } [/CODE] and this is the html code to go with it [CODE] <div id="headerWrap" …

Member Avatar for Arkinder
0
149
Member Avatar for sirlink99

I have made this screenshot program in hopes of eventually making a screen recorder, but I am having trouble displaying the image for the user to see. I currently have it so that it displays and saves. When it displays it is blank, but when it saves there is a …

Member Avatar for mKorbel
0
197
Member Avatar for pseudorandom21

What type of code? Are you making it online (applet), or a launch-able application? Edit: by what type I mean game or website enhancing program, or a database like code

Member Avatar for NormR1
0
125
Member Avatar for sirlink99

I made a simple menu using css and a tutorial on youtube and now I would like to change px into percentages. I have managed to do most of it, but when I go to products, insted of them being listed under each other 4 of them are beside eachother …

Member Avatar for Arkinder
0
501
Member Avatar for sirlink99

I am making a game where random obstacles appear. The obstacles will move towards you. I currently have this code to animate the obstacles. [CODE] for (int i = 0; i < obstacle.size(); i++){ // animate walls obstacle.elementAt(i).x -= 1; } [/CODE] My vector multiple instances of the Walls class …

Member Avatar for stultuske
1
113
Member Avatar for Srin

5 vectors could solve this problem (though there probably is a more efficient way). Make one for the start x and one for the start y. Repeat for the end positions. make one for the color use an advanced for loop to set the color and then print the lines …

Member Avatar for Srin
0
1K
Member Avatar for rotten69

According to this your image does not exist. Make sure you have the correct directory, and the image name is correctly typed (including the extension).

Member Avatar for NormR1
0
249
Member Avatar for J-Dub

Use a for loop to set up the buttons, and then use the index of the button in the array for the separate commands. button[0]{} button[1]{} etc.

Member Avatar for mKorbel
0
4K
Member Avatar for sajjad037

Is there any ide that could be used to make Java files for Android? It would be nice if you could test it out using the ide, if not then if there would be an Android emulator it would also be nice.

Member Avatar for peter_budo
0
82
Member Avatar for sirlink99

I would like to display 3 images in a row, and then 3 more underneath, and so on (until there are no more images). I currently have this css code [CODE] #productsMenuFirst{ display:inline; width: 100px; height: 60px; padding-right: 50px; padding-left: 50px; } #productsMenu { display:inline; width: 100px; height: 60px; padding-right: …

Member Avatar for Arkinder
0
210
Member Avatar for sirlink99

I have this code that should set up the page header [CODE] #headerWrap { margin-left: auto; margin-right: auto; width: 700px; height: 100px; background: url(Images/header.gif) no-repeat; }[/CODE] the picture is not being displayed. Please tell me how to fix this. Thanks

Member Avatar for sirlink99
0
78
Member Avatar for rotten69

If you are worried about them typing their answer in with crazy caps in the middle of the word, then use the equalsIgnoreCase();

Member Avatar for NormR1
0
195
Member Avatar for andersonelnino
Member Avatar for shan123456

you could get the characters from the string (that you get from the input) and use a loop to get all the characters in the loop you want to see if there is a space. if there is then you would signal that that is one word, then you would …

Member Avatar for sirlink99
0
184
Member Avatar for andersonelnino

After I fix the spelling errors it runs fine for me. I don't get any errors. Next time please use the code tags Your code with fixed cases: [CODE] import javax.swing.JOptionPane; public class Bmi { public static void main(String[] args) { //declare variables int height; int weight; String accept; double …

Member Avatar for peter_budo
0
185
Member Avatar for sirlink99

I am creating a program that will simulate a fish tank (got it off of google) and when I try to get the image using [CODE]mClownImage = getToolkit().getImage("Fishes/mClown.gif");[/CODE] the getToolkit() part gives me an error. it suggests that I make a method called that. I have imported java.awt.Container; which contains …

Member Avatar for NormR1
0
73
Member Avatar for jackmaverick1

You could also use a different method to read it look at [URL="http://download.oracle.com/javase/1.3/docs/api/java/io/BufferedReader.html"]this[/URL]

Member Avatar for sirlink99
0
326
Member Avatar for harinath_2007

I have heard that they revised the audio player for Java. Does that mean that Java can now play .mp3 and .wma files, not just .wav? Or did they just implement a new way to add audio?

Member Avatar for jwenting
0
139
Member Avatar for laguardian

or you could make a new JFrame that displays the information the user entered and then after they click the "confirm" or the "OK" button then use the dispose (); method to get rid of the frame [CODE] confirmationFrame.dispose (); [/CODE]

Member Avatar for JamesCherrill
0
161
Member Avatar for yazz110

A combination of this forum, a couple of books (I use [URL="http://www.amazon.com/Sams-Teach-Yourself-Java-Days/dp/0672329433"]Sams Teach yourself Java in 21 Days[/URL] as my reference (don't think you can actually teach yourself Java in 21 days)), and youtube tutorials, like [URL="http://www.youtube.com/watch?v=Hl-zzrqQoSE"]TheNewBostons[/URL] Java tutorials will suit you well when learning java.

Member Avatar for peter_budo
0
283
Member Avatar for ericwalter

[QUOTE]first of all how do you know it is his homework?[/QUOTE] If it wasn't homework and he was stuck without code, he would then go and learn/make a program that is simpler then the one he is currently trying to make. He would do this so that he could learn …

Member Avatar for peter_budo
0
6K
Member Avatar for sirlink99

I am working on a snake game. I have posted about it before. It is going well, and now I would like to implement a high score option, that saves the score online, so that everyone can see it. I am planning to make a menu, that will have a …

Member Avatar for Ezzaral
0
682
Member Avatar for sirlink99

I would like to learn PHP and I am wondering how to install it. I am planning on using the Eclipse PHP IDE for coding. I have tried a couple of installs for PHP and I could not get any of them to work. I have a vista ^$ bit …

Member Avatar for Ezzaral
0
117
Member Avatar for FALL3N

you can use the startsWith(); method, which checks if the word starts with the letters entered. for example [CODE] private String[] auto = {"lorem", "ipsum", "dolor", "sunglasses", "friend", "time", "flies", "like", "an", "arrow", "daisy", "bell", "the", "quick", "brown", "fox", "jumps", "over", "lazy", "yellow", "dog"}; public static void main (String [] …

Member Avatar for JamesCherrill
0
160
Member Avatar for kalodakilla

you dont use the jar file. Just copy the class files into your storage area for your website and then navigate to it. Like so [CODE] <html> <head> <title> The ArrowKeys2menuprob2 applet </title> </head> <body> <h2> Here is the YourAppletName applet </h2> <hr> <applet code="RectanglesMover.class" width="500" height="500"> </applet> <hr> </body> …

Member Avatar for NormR1
0
293
Member Avatar for sirlink99

I have this snake game I keep talking about and I added in a menu. now when I run the snake game the first time it works. When I press T to return to the title, it returns. When I click on the colored snake game after that the snake …

Member Avatar for NormR1
0
189
Member Avatar for sirlink99

I am trying to make a snake program The code I currently have looks like this [CODE] import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.util.*; public class SnakeG extends JPanel implements KeyListener, Runnable{ private Vector<Point> snake = new Vector<Point> (5,2); private Vector<Rectangle> snakeRectangle = new Vector<Rectangle> (5,2); public void startGraphics …

Member Avatar for sirlink99
0
368
Member Avatar for sirlink99

I am trying to make a snake game and I am wondering how I could get an element of an vector and then use the number for the y coordinate like when using ararys lets say the x element I am using is 3 then I could type in arrayY[3] …

Member Avatar for mKorbel
0
133
Member Avatar for sirlink99

I am making a simple game and I cant seem to get the line to center. I would like it all to be in a column and centered. I have this line of code that is not centering [CODE] JLabel numberOfChangesLabel = new JLabel("" + totalChanges); pane.add (new JPanel ().add(numberOfChangesLabel)); …

Member Avatar for sirlink99
0
202
Member Avatar for conanzz

[QUOTE]Sorry sir I didn`t understand you about making string inside the listener,, I want to change an integer..!![/QUOTE] Yes, yo do want to display an integer, but you want to make it a string [CODE] String displayText = "" + number; [/CODE] and then you want to set that to …

Member Avatar for mKorbel
0
299
Member Avatar for fcaoile

you could put a boolean variable in for the condition and then set it to false when you want the delay, then start a timer that generates every 2 seconds, then you want to stop the timer set the variable to true and then call your loop again. You would …

Member Avatar for mKorbel
0
2K
Member Avatar for poo11

Get the input and then separate it to characters. then compare them to print out a text. Without your code I can offer no further help.

Member Avatar for stultuske
0
115
Member Avatar for phoenx

make a graph calculator. use graphics and then get the user to type in a valid expression. then calculate the y points for the x values and graph it. This will let yo use graphics and arrays. You will also use Math class. It will be interesting especially if you …

Member Avatar for phoenx
0
114
Member Avatar for sirlink99

I am attempting to make a chatroom as my first program that communicates between computers. I am having trouble setting up the Server Socket Though. My program stops when it tries to set up. Here are my variables [CODE] private JTextField textArea; private ServerSocket servSock; private Socket sock; private BufferedReader …

Member Avatar for NormR1
0
222
Member Avatar for funkyanki

If you already know C/C++ then I'm sure you could understand TheNewBoston's tutorials on Java. Just youtube him. He rushes though basic concepts (That you should already know). Just try to learn from him. You can always come on this forum to ask questions if you need extra help :)

Member Avatar for funkyanki
0
154
Member Avatar for MagnetoM

I have Sams Teach Yourself Java 6 in 21 days, but I just use it as a quick reference,but I'm sure you can use it to learn. It may be difficult, and it definitely wont take you 21 days to learn, but you will learn it eventually.

Member Avatar for sirlink99
0
111
Member Avatar for sirlink99

During the 3 years I have had my laptop, I found a weird glitch in the Vista OS. Sometimes when I shut down my computer the screen goes blank, and I cannot wake it up. I assume the Vista OS had shut down, but it didn't shut down the computer. …

Member Avatar for Sunnyrepairs
0
101
Member Avatar for sirlink99

I am not sure where this would go, because I did not find a CD/DVD drive section. I have a laptop (Toshiba) and my DVD drive stopped working. I believe it stopped working a while back, when my windows core files were dumped, and when I used the system recovery …

Member Avatar for jingda
0
329
Member Avatar for caierhui

you could store the day in a file and then when you run the program it checks todays date and compares it with the date in the file. if they are different then it starts a new set, however if they are the same then you read off the last …

Member Avatar for javaAddict
0
316
Member Avatar for Jake.20

put this line in for your text [CODE] new JButton ("<html><CENTER><font size=\"3\">+/-</font></CENTER></html>") [/CODE] set the size of the button with the [CODE] JButton.setPreferredSize (new Dimension (sizeX,sizeY)); // these are in px [/CODE] I needed to use these for my calculator (lol)

Member Avatar for Ezzaral
0
209
Member Avatar for freesoft_2000
Re: GoTo

if you want to get out of the if statement just use the break; command. It will get out of the nearest set of braces

Member Avatar for Ezzaral
0
151
Member Avatar for magnetic rifle
Member Avatar for icehiro

It is because you set check to true. [CODE] boolean check = false; for (int i = 1; i<=numplayer;i++){ while (check == false){ System.out.print(playerarray[i-1] + ", what number do you think it would be :"); Scanner num = new Scanner(System.in); String checkifint = num.next(); try { int guess = Integer.parseInt(checkifint); …

Member Avatar for sirlink99
0
167
Member Avatar for yapaarachchi
Member Avatar for yumyam09

[QUOTE=AhmedGhazey;1598100]i tried it before it works fine , try it and tell me . SHUTDOWN -S TO RESTART SHUTDOWN -R TO ABORT SHUTDOWN -A I hope this help. :)[/QUOTE] He is trying to [B]turn on[/B] a computer not turn off. An idea, but it is not with programming. Just make …

Member Avatar for stultuske
0
188
Member Avatar for sirlink99

I am going to make a calculator and I am having some Issues arranging the buttons. You should be able to see the layout when you run the code. Some clarification though there will be a blank spot under the "3" for a "+/-" button (switches between positive and negative). …

Member Avatar for Ezzaral
0
169
Member Avatar for sirlink99

I am learning C++ and I learned that you can create your own types. I decided to try this in java. I am wondering if there is an easier way to make a bunch of variables private other then typing out private for each of the created variables. for example …

Member Avatar for sirlink99
0
119
Member Avatar for Jessurider
Member Avatar for NormR1
0
120
Member Avatar for sirlink99

I have a toshiba laptop running XP and the internet was working until a while back, but then it stopped. I have a Vista on the same internet and it works on it. What could be the problem we have a DLink router. I have tried many things that I …

Member Avatar for sirlink99
0
71
Member Avatar for Dand321

Mine has a same type of error. When I start it up in the normal power setting it turns the fan for like a second then turns off, when I put it to a higher setting the comp turns on, but there is not video out, so I don't know …

Member Avatar for sirlink99
0
190

The End.