32,199 Topics

Member Avatar for
Member Avatar for Newskin01

So I have an array [CODE]String[] directions = {"n", "e", "s", "w"}; Random dirPick = new Random(); int rNum = dirPick.nextInt(4); String direction = directions[rNum];[/CODE] Now say that one of these doesn't exist and if it picks it I need to take it out of being able to be picked. …

Member Avatar for DarkLightning7
0
125
Member Avatar for dyingatmidnight

Hello all, I am currently in the process of learning C++ for a work term position I am on. After hitting a wall trying to teach myself from books I decided it might be easier to translate some old Java programs from school into C++ to get a better understanding …

Member Avatar for dyingatmidnight
0
323
Member Avatar for 24x24

This is homework. I have the code written, though. The thing works. Mostly. The assignment is to write a program that reads a list of integers from a file, prints the maximum value in the list to the console, removes the maximum value from the list, and stores the (smaller) …

Member Avatar for 24x24
0
192
Member Avatar for zach&kody

My friend and I are in a computer science class, and we were wondering how to edit the contents of a jar file? What software would we use, lines of code we might need, or any other input would be greatly appreciated. -From our computer to yours'- zach&kody

Member Avatar for JamesCherrill
0
964
Member Avatar for error.exe.er

Hi every one ! Guys i am trying to do the Fibonacci numbers without an input just want it to number 8 then stop, But i want to do it using Do While i did it but , i am missing something i can't find what is it its won't …

Member Avatar for error.exe.er
0
97
Member Avatar for ubi_ct83

Hello, i query data from database using jdbc, and there will be a lot of data.how can i solve 1 by 1 of the data?currently, my code just solve the last data. this is the pseudo: [CODE] JDBC connection query data = ResultSet{userid,task_id} while (Resultset()) userid, task_id count++ end close …

Member Avatar for ~s.o.s~
0
87
Member Avatar for newack

can anyone please explain what is function of this. ? Also, I could not understand enumeration.

Member Avatar for JamesCherrill
0
73
Member Avatar for dangari

Hi guys, My code below works well when it's assumed that PuTTY is resident on the Windows machine where this application is running, and have PuTTY connect to a Linux server on the local network. [CODE] //more code Runtime r = Runtime.getRuntime(); Process p = null; String s = "C:\\Program …

Member Avatar for dangari
0
1K
Member Avatar for gcclinux

Hi I have search the net to an extent that I can not more and I still have not found the answer, so I am someone here can tell me, I want to be able to list all local drives in a system, but excluding USB. Network, DVD, etc This …

Member Avatar for gcclinux
0
644
Member Avatar for Slyvr

When I run my program, sometimes it shows up and sometimes it just shows a blank frame. Is this because it's having trouble loading the canvas/buttons and all that stuff...aka do I need a loading screen and how do I do one in java?

Member Avatar for JamesCherrill
0
101
Member Avatar for skajava
Member Avatar for mKorbel
0
88
Member Avatar for bharathisankhya

Hi All, Iam using RSF, I need to clear a form after user clicks on submit button using onLoad function in Javascript. Can anyone give me the solution. immediate help is appreciated

Member Avatar for Dean_Grobler
0
80
Member Avatar for SMITA6076

[B]For the error and my question, skip to the bottom. I just posted all of the code in case it's needed.[/B] [CODE]/*********************************************************************************** * * File: Customer.java * * Author: Austin Smith * * Date: 04/04/2011 * * Description: The Customer class handles all client information * such as name and …

Member Avatar for SMITA6076
0
246
Member Avatar for Mkmd13

Hey I am almost done with my hangman game for java but Im having a tough time in getting the last bit of it. I have included ALOT of comments for you guys to help me out with it. [CODE]import java.io.*; import java.util.*; import javax.swing.*; public class Hangman { public …

Member Avatar for VernonDozier
0
180
Member Avatar for Slyvr

I have my code set up so I can 1)select what image and 2)the coordinates of the mouse click where the image is going to be placed. What it currently does it place the right image in the right coordiantes but if I click again somewhere else, it replaces the …

Member Avatar for Slyvr
0
124
Member Avatar for Kuroshi

I have been trying to make my program load the images while using web start with no success. The following code is inside an extended JButton class. Image is a string containing the address of the desired image ("0.jpg", for example), I know that this would only work if the …

Member Avatar for Kuroshi
0
142
Member Avatar for Mizki

How to write the recursion code in calculating the sum of the array elements at odd value? I understand the factorial example using recursion, but I am having a really big trouble when writing the recursion codes to perform anything else on my own :/ Please help with this task …

Member Avatar for Mizki
0
3K
Member Avatar for yancouto

Hi everyone, I'm trying to create a program that you can use to communicate to other people with the same program. It connects to a Server program that gets your message an send it to everyone. I found 2 problems that I haven't been able to solve. The first one …

Member Avatar for yancouto
0
780
Member Avatar for SMITA6076

I have a [ICODE]JFrame[/ICODE] window to which I am trying to add 3 panels. One panel is for input (text areas and their labels which I already have arranged within the panel), one is for a set of buttons, and one is for output. I want the the input and …

Member Avatar for JamesCherrill
0
389
Member Avatar for Pritz

I am interested in hiring a software developer but I do not know what should I be asking for when I post the job. My project consists in developing a software that can analyze an edge-matching puzzle game of my invention to produce as many possible solutions numbered, and also …

Member Avatar for Momerath
0
235
Member Avatar for bradyramone

I have a simple jpg image saved in a field of type longblob. Now i need to get that image and put it in a JLabel or something similar to show the picture in the program. Anyone knows how can I do that please? I already know how to get …

Member Avatar for kramerd
0
157
Member Avatar for CorruptionInc

So here's my assignment: Define a class Quiz that implements the Measurable interface. A quiz has a score and a letter grade (such as B+). Use the implementation of the DataSet class in Section 9.1 to process a collection of quizzes. Display the average score and the quiz with the …

Member Avatar for CorruptionInc
0
1K
Member Avatar for Aepexx

Here is Assignment07: [CODE]public class Assignment07 { public static void main(String []args) { Asn07Employees emps = new Asn07Employees(ids, hours, rate); Asn07Employees allEmps[] = new Asn07Employees[7]; int ids[] = {5658845, 4520125, 7895122, 8777541, 8451277, 1302850, 7580489 }; int hours[]={ 12, 15, 7, 16, -1, 20, 15 }; float rate[]={6.5f, 12.5f, 1.5f, …

Member Avatar for yancouto
0
125
Member Avatar for banks2140

I am supposed to take this program and use a method to tokenize the inputted string into words and store them into an array of strings. Then use another method to print the array element one word per line. I need help on the first method, trying to tokenize and …

Member Avatar for kramerd
0
106
Member Avatar for Desi Boy

Hello Everyone I was instructed to do the following but came up with 10 errors which are listed below can anyone please help with this. Write a sentinel loop that will sum all positive integer values entered; use a negative number to end the loop. Be sure to test for …

Member Avatar for kramerd
0
246
Member Avatar for sariberri

I don't know why I keep getting an InputMismatchException :/ It highlights when I call the load() method. Thanks [CODE] import java.util.*; import java.io.*; public class GradeManager { private ArrayList <Student> StudentGrades; public GradeManager(){ StudentGrades=new ArrayList<Student>(); load(); } public void load(){ Scanner fileIn=null; try{ fileIn=new Scanner(new File("grades.txt")); }catch(FileNotFoundException e){ System.out.print("Cannot …

Member Avatar for kramerd
0
118
Member Avatar for dem10

Hey all, I have some code here for a red black tree that prints out in preorder traversal. The entire program works fine and prints out to a file when I run from the terminal "java Main.java<input1.txt>output.txt", however I need set it up so it writes to standard output "output.txt" …

Member Avatar for kramerd
0
106
Member Avatar for sirlink99

I am wondering if I could write this code to a file and then print it at a starting location (like an image). [CODE] g.setColor(Color.white); g.fill3DRect(en1X + 0 * enZ, en1Y - 25 * enZ, 5 * enZ, 5 * enZ, true); g.fill3DRect(en1X + 5 * enZ, en1Y - 30 …

Member Avatar for mKorbel
0
200
Member Avatar for HelloMe

Hello guys... I have a strange problem on my calculation for a First in First Out Algorithm. The problem is, when i have to calculate 4 processes and above, the waiting time on my processes are wrong, but when i have to calculate only up to 3 processes it is …

Member Avatar for HelloMe
0
101
Member Avatar for rjdelight

Hi all, I'm trying to get the information from a text file to show up in the JTextArea I have in a GUI. I'm using the GUI editor in NetBeans, because I'm a Java newb. I've been reading a lot of things on the web and can't seem to figure …

Member Avatar for sirlink99
0
3K

The End.