32,207 Topics
![]() | |
Hi this is a decompiled version of a guessing game which i am required to submit in assignment. can anyone please make it run anyhow. i hav also attached sample from which i generated code any help will be appreciated. Thanks [code=language] // Decompiled by DJ v3.11.11.95 Copyright 2009 Atanas … | |
Hello, I am working on a code which should execute any *.exe file in java. I have used a sample code which works for UI based application but do not work for command prompt applications like cmd.exe or mysql.exe. Please advise for the improvement. Thank you in advance. Here is … | |
im working on this java program: Create a Java program that creates six random numbers between 1 and 10 and for each randomly generated number it displays the text describing the number rather than the numerical value. For instance, if the number generated was 3 then it should display three; … | |
[CODE]double s = 1/(noOfPhases + 1);[/CODE] When I print the s the value I get is zero however when i print noOfPhases the value is 3. If i do the following [CODE]double s = (noOfPhases + 1);[/CODE] the value returned is 4. Why can I not not do 1 divided … | |
I have these code below for the button : [CODE] import java.awt.*; import java.applet.*; import java.awt.event.*; public class Coba extends Applet { Button button1; public void init() { Font font = new Font("TimesRoman",Font.BOLD,16); setFont(font); button1 = new Button("Level Easy"); resize(250,250); LevelEasy lvleasy = new LevelEasy(); button1.addActionListener(lvleasy); //button1.addActionListener(this); add("Left",button1); } private … | |
I am doing a cash registry program and I want to use a multidimensional array. May someone give me a sample code for it. The sample code must be as simple as possible just for my reference. Reply will be appreciated very much. | |
Hi all, I need help regarding following problem. I'm getting HTTP get responses from a program(Kannel) periodically. The HTTP is in the following format. "http://localhost/sms.php?A=10&B=abc" I want to know whether is it possible to get the values of A & B using a Java program (not JSP) as soon as … | |
I have a cardlayout of pictures but i want to know if i can produce some special effects like they have in MS Powerpoint where the picuture slides can fade in/out or swirl into or out of the panel or display text words one at a time, etc. Is it … | |
I need to write few class which are to be used to validate the data. I know some validations which we will use generally. if anybody knows more please help me by providing the list of some more validations. The validations which I know are as follows: String: length isAlpha … | |
hi to every body.me is new in java.in future i want to built a software in java. so i want to b a java java java master.is someone who can guide me ? is? | |
Hi, I have a program that draws a line between two points when the user clicks at two points on a canvas (added in a frame) and clicks Repolot button. Each time i click the button the previous line is gone. But i want that when i click the button … | |
Hi guys, i've been stuck on one part of an assignment where i have to call a number 6 times from a different method/class. I thought maybe doing a for loop calling its 6 times but i'm not sure how to call the method into the other method, this is … | |
I created an array, and I am trying to pass it to a method then double the size of that array. Than I would like to print the array. I am at a loss right now as to why it wont print, and what I am doing wrong. Any help … | |
Let's claim that I have jar called j.jar in folder called: my_folder. Then in this jar I have folder called:javclass and in this folder ther is main class called: main.class. And I have a question: How html file which opens it should look like ?? | |
I'm trying to write a tic tac toe applet. Below is the code. I can't get it to line up in 3 rows of 3 and also it shows "win" as soon as 1 button is clicked. Any help would be appreciated. Thanks. import java.awt.*; import java.awt.event.*; import java.util.Random; import … | |
i'm thinking how to do this since last week. i can make a rps game in java, BUT not in OO way. just the simple ones. what i want to do is a rps game - the OO way. i planning this program to have two options, play with player … | |
Hello... again. I'm sorry about asking about this again, but I'm still stumped =S I can't find any tutorials or examples on this matter*, and I don't know what to do. I still need to find a way to get commands to paint from one JVM to another. I tried … | |
Hi, I'm starting working with the Graphics and related and strugling to understand it. I'm trying to do something as simple as drawing a String on a panel. The string changes on runtime. I post the code below. In effect, every new number is drawn on top of the old … | |
Hey guys and girls. Im working on a program at the moment, the aim of which is to determine a users age level (by year at school), and give them a set of randomly generated maths problems based on their age (eg- 1st grade only has to deal with numbers … | |
hi, i am doing a system in java for my assignment .that system is able to add ,delete,modify records. i have created sql commands for all in my programme.but i don't know how to put codings on above buttons here i attach some cods.any one please help me. this is … | |
I am a beginner in Java programming after a few lessions I was provided with this task and I have no clue how to go about it.this appears to be simple but for me is a mountain, if any one could help I will really appreciate it. Here goes the … | |
These are my three functions explaining sql functions update and delete functions .can any body help me to write the buttonactionperformedfunction? [ICODE] public boolean editBus(int busid,String name,int seats) { boolean bEdited = false; try { updatebus.clearParameters(); updatebus.setString(1, name); updatebus.setInt(2,seats); updatebus.executeUpdate(); bEdited = true; } catch(SQLException sqle) { sqle.printStackTrace(); } return … | |
i am creating my jar file jar cvf javaappl.jar javaappl jar cfm javaappl.jar manifest.txt javaappl manifest is added correctly. but when i try to run java -jar javaappl Invalid or corrupt jar is displayed. Earlier it has run, but the same thing is not running now. What is the probable … | |
I know what a Jar file is. [url]http://java.sun.com/developer/Books/javaprogramming/JAR/basics/build.html[/url] I just can't figure out how to get it to be recognized as a command. I have the same problem with appletviewer. I was told i was suppose to to set some path but i am not sure where it is. I'm … | |
I want to create a custom NumberFormat which returns empty string for negative values and the double number iteslf for +ve and zero values. Please guide me.................... | |
Hi all, I am new to java i want to download, jdk1.5 as my guide specified ,, but i dont know the link......so please help me out........and tell me out to install it on my pc. Thanks, ishlux | |
Hey folks, Now java may be the wrong language for this but I would like to get a motion sensor program going (if possible). Basically I already have hooked my webcam up, and can import it to a window via java. I am trying to find a way to basically … | |
i just dont know how to convert this. i have three integers for month, date and year. year is a two digit input. i want to convert these three into one variable type long.. but i dont know how to do it. i tried adding the three integers, but i … | |
Hi am new to Java and am developing a multi agent application using Jade. I have coded 1 agent using Java and the other agent using vc++. My problem is communication between java and vc++. 1) I need to run the vc++ program within the java program for which i … | |
//track the number of times each face of the dice is rolled if(Integer.parseInt(d1.toString()) == 1) one++; if(Integer.parseInt(d2.toString()) == 1) one++; if(Integer.parseInt(d1.toString()) == 2) two++; if(Integer.parseInt(d2.toString()) == 2) two++; if(Integer.parseInt(d1.toString()) == 3) three++; if(Integer.parseInt(d2.toString()) == 3) three++; if(Integer.parseInt(d1.toString()) == 4) four++; if(Integer.parseInt(d2.toString()) == 4) four++; if(Integer.parseInt(d1.toString()) == 5) five++; if(Integer.parseInt(d2.toString()) == … |
The End.