Latest Tracked Programming Questions Of Java

Java : Data Validation within a for loop   (Views   2091)

Posted On: Thursday 29th of November 2012 08:29:45 PM
Is that possibleI need to prompt the user a set number of times, but they cannot enter a number less than zero. How do I do thisThis is where I am trying to add that in my code ( but do not have any data validation because I am not sure how to...Show More

Java : Min heap   (Views   217)

Posted On: Thursday 29th of November 2012 08:29:45 PM
How do I use java's min heap I've been looking all over but I can't find out how to initialize it. I tried things like BinaryHeap h = new BinaryHeap();MinHeap h = new MinHeap();and frankly it's...Show More

Java : Question about how to add with i++   (Views   179)

Posted On: Thursday 29th of November 2012 08:29:43 PM
I have just started learning Java not to long ago but i learned how to use i++ in a command but how may i add all figures used within an i++ statement. In this at the end i want to add the total price of all itmes to create a bill that takes all items...Show More

Java : Exist and Clear Buttons not displaying in Java program   (Views   179)

Posted On: Thursday 29th of November 2012 08:29:37 PM
I cannot get the Clear and Exit buttons to display in my popup window...any ideas whyWrite the program in Java with a GUI and have it calculate and dispaly the mortgage payment amount from user input of the amount of the mortgage, the...Show More

Java : Is This Program alryt   (Views   202)

Posted On: Thursday 29th of November 2012 08:29:36 PM
it jst take patient data then it sets the patient information and update it does it allryt i hav yet to make the main function but anyone guide me is it ok uptil now package ACP.patient;public class patient...Show More

Java : Help with rock paper scissors function.   (Views   221)

Posted On: Thursday 29th of November 2012 08:29:34 PM
private static String getHumanChoice() { System.out.print("Please enter Rock, Scissor, or Paper: "); String inString = input.nextLine(); return inString;Basically what I need to...Show More

Java : JTabbedPane change color of lip under tabs....   (Views   221)

Posted On: Thursday 29th of November 2012 08:29:33 PM
Hi ,I can't for the life of me figure out which property manages the color of the thin border under a JTabbedPane's tab buttons.a screenshot might better illustrate (attached).The charts are courtesy of JFReeChart. I've...Show More

Java : replace method   (Views   206)

Posted On: Thursday 29th of November 2012 08:29:30 PM
I am doing a word game and i am trying to replace the hyphens(like a game of hangman) to the user guess of letters( if they are correct)Whenever I enter a letter, all of the dashes get replaced with the certain letter and more dashes get printed to...Show More

Java : Designing a UI in Java   (Views   194)

Posted On: Thursday 29th of November 2012 08:29:28 PM
I'm trying to figure out how to make a desktop alarm clock (as per the suggestion in Show More

Java : read chat text of a website (learning chatbot)   (Views   207)

Posted On: Thursday 29th of November 2012 08:29:27 PM
I want to program a learning chatbot. But therefore I need to read out the text of the chat. Also I need a way to reply.As the chat to read I thought of Show More

Java : keeping count of the # of salaries that fall w/ in a Salary Range.   (Views   18)

Posted On: Thursday 29th of November 2012 08:29:25 PM
, I've been working on this code for 3 days now and still cant seem to wrap it up. Ill explain what i need to do. Basically, I have the first step completed, which is to hard code the salesman's gross sales data in a one-dimensional array,...Show More

Java : Beginner Question Regarding Nested If-Else Structure Implementation   (Views   204)

Posted On: Thursday 29th of November 2012 08:29:25 PM
I am taking a Java course at my local CC, and I have managed to write a fairly concise albeit basic program utilizing a scanner object. The code is below, and if you think it looks kind of repetitive...well it is, Show More

Java : Cannot find symbol: compile errors   (Views   183)

Posted On: Thursday 29th of November 2012 08:29:17 PM
Ok I cannot figure out why my inventory class will not compile. The Product and product extends classes compile without error. The error I get is the "cannot find symbol". Any help with this would be great.Inventory classShow More

Java : Inner or nested class problem.   (Views   215)

Posted On: Thursday 29th of November 2012 08:29:16 PM
You should declare your buttons and Circle variables as instance vzriables, and initiate them in the constructor. like so:public class aListen extends JFrame { Circle c1 = null; JButton jbtnew = null; JButton jSolve = null; public aListen(){ c1 = new...Show More

Java : SSL Exception: javax.net.ssl.SSLException   (Views   224)

Posted On: Thursday 29th of November 2012 08:29:14 PM
I am getting the following error when attempting to test my SSL Server/Client program.Server aborted: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:...Show More

Java : binding services to buttons via Flex and Java   (Views   235)

Posted On: Thursday 29th of November 2012 08:29:12 PM
Hi allI'm on my way of creating a Flex and Java based portlet to be deployed in a web portal. This portlet can be utilized by users to run services (such as generating files to be used in a scientific research). The portlets are...Show More

Java : sum/addition of random values   (Views   209)

Posted On: Thursday 29th of November 2012 08:29:11 PM
I am trying to write a fairly simple program here, the idea of it is that it generates two random numbers (in this case between 0 and 100) and asks the answer. If correct answer is given, it says it's correct, if it's incorrect it says so and gives the...Show More

Java : working on a breakout game for Java   (Views   193)

Posted On: Thursday 29th of November 2012 08:29:08 PM
Im sure you have heard of breakout a popular game back in the day, well i have to make one for a school assignment, just wondering if anyone could help me to get a part of it done. I cant figure out how to make the bottom board track the mouse. any help...Show More

Java : What is the interpretation the given line   (Views   198)

Posted On: Thursday 29th of November 2012 08:29:08 PM
What does this line mean head = tail = new Node();Having troubles understanding this methodpublic void add(E element) { if (head == null) { head = tail = new Node(); head.element = element; ...Show More

Java : Java as career   (Views   195)

Posted On: Thursday 29th of November 2012 08:29:01 PM
I am currently in third year computer engineering.After completion of degree course next year I am little bit confused with various options.Like should I stick with knowledge based programming languages as C++ or JAVA , or should I learn .net or something...Show More

Java : Identify and swap two numbers in an array   (Views   200)

Posted On: Thursday 29th of November 2012 08:28:59 PM
Here is my assignment:I have to create a ten element array with numbers between 0 and 99 inclusive, and then identify the largest and smallest numbers in the array and their locations. I then need to swap those two numbers, and redisplay the...Show More

Java : Creating Data & Function Graphs & I/O Data Application: A Plea   (Views   214)

Posted On: Thursday 29th of November 2012 08:28:58 PM
For Graphing equations, take a look at overriding the paint() method in a JComponent like JPanel. We have a few tutorials in the Java Tutorials Section on this.As for interacting with other devices as you are describing, you'll have to look...Show More

Java : problom on slide animation for a tile puzzle game   (Views   192)

Posted On: Thursday 29th of November 2012 08:28:57 PM
Hi this is my first time posting here so sorry for any mistakes. Im new to java and ive been trying to create a tile puzzle game in which the tiles slide and respond to the arrow keys. the only problom im having is to make the tiles slide. this is the...Show More

Java : context menu in IE Help please.   (Views   171)

Posted On: Thursday 29th of November 2012 08:28:54 PM
Okay, so i did some searching on the net and found this piece of code. var parentwin = external.menuArguments; var doc = parentwin.document; var sel = doc.selection; var rng = sel.createRange(); var str = new String(rng.text);...Show More

Java : Program won't enter while loop with array conditions   (Views   140)

Posted On: Thursday 29th of November 2012 08:28:49 PM
I can't explain the code right now, but if you can decipher it, how come when I enter "2, 1, 3", the program thinks I entered "1, 2, 3" and doesn't execute what is in the while loopimport java.io.*;public class...Show More

Java : Generate Array - No Duplicates - Must use Math.random() / (+2 more Qs)   (Views   131)

Posted On: Thursday 29th of November 2012 08:28:48 PM
all. Third time posting a question, and all of the help I've received in the past was amazing.This is in reference to an assignment I was working on before, but the questions are completely different now, so I decided to repost.Show More

Java : Want to retrieve data from database   (Views   183)

Posted On: Thursday 29th of November 2012 08:28:46 PM
Hai everybody..I created a java code to retrieve data.That is,my database contains 3 fields- number field (id) which represents the number of actor,second field their name and third field their actions.A person can have more than one...Show More

Java : Grade average program compiles fine, but crashes on input. Help   (Views   159)

Posted On: Thursday 29th of November 2012 08:28:43 PM
Okay, so, a brief description of the problem as best as I can give:The code compiles without error, and it will load the GUI. The menu and buttons have functionality and do as they're meant to do. I run into problems when I begin with the...Show More

Java : Math Class Program   (Views   177)

Posted On: Thursday 29th of November 2012 08:28:39 PM
I am having a couple of problems with my math class program.I need to use Math.abs to make both the sqrt and log positive numbers. But I am not sure where to put it because when I was typing in user = Math.abs(user); before the sqrt statement,...Show More

Java : Does Not Override Abstract Method   (Views   179)

Posted On: Thursday 29th of November 2012 08:28:38 PM
! I'm having the same problem as you did...i'm doing this program for 2 weeks now and i don't know what to do anymore...i have to make Bayes classification...this is what i've made so farimport javax.swing.*;import...Show More