Forum: Java Dec 13th, 2008 |
| Replies: 3 Views: 697 import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.text.DecimalFormat;
public class SalesTaxCalc extends JFrame
{
private JLabel label1, label2; // Labels... |
Forum: Java Dec 13th, 2008 |
| Replies: 14 Views: 1,364 Thank you for your suggestion. Can you direct to me to a good source where I find out how to use this expression? I'd like to finish this and move on to another project involving a JSlider.
... |
Forum: Java Dec 12th, 2008 |
| Replies: 14 Views: 1,364 |
Forum: Java Dec 12th, 2008 |
| Replies: 7 Views: 450 import java.util.Random;
public class MatchGame
{
Random rand;
int[] guess;
public MatchGame()
{
rand = new Random();
guess = new int[3]; |
Forum: Java Dec 11th, 2008 |
| Replies: 7 Views: 450 I appreciate the help, but you lost me.
1st ? - Do I remove:
public static int[] guess = {5,9,0};
2nd ? - Where do I insert Random object and related loop?
I'm getting errors out the bazoo,... |
Forum: Java Dec 11th, 2008 |
| Replies: 7 Views: 450 public static int[] guess = {5,9,0};
with:
int[] guess = new int[10];
for (int i = 0; i < 10; i++)
guess = i; |
Forum: Java Dec 11th, 2008 |
| Replies: 7 Views: 450 I'm working on a simple matching game, whereby my array includes 3 numbers:{ 5,9,0 } and the user tries to guess them.
Instead, I want to use the Random class to generate 3 different numbers from... |
Forum: Java Dec 10th, 2008 |
| Replies: 14 Views: 1,364 Can you help me get started with loop for indexOf and substring?
I've tried so many string options in the last couple of days that my head is spinning...
Thanks in advance. |
Forum: Java Dec 10th, 2008 |
| Replies: 14 Views: 1,364 or, maybe I should be looking at string tokenizer?
Can anyone help? |
Forum: Java Dec 10th, 2008 |
| Replies: 14 Views: 1,364 Am I on the right track with the following?
String[] strarray = s.split("\\p{Space}"); |
Forum: Java Dec 10th, 2008 |
| Replies: 14 Views: 1,364 Well, any other suggestions?
I tried what you said and get the following:
Input: hi. who are you? [Ok]
Message 1 Output: H [Ok]
Message 2 Output: who are yo |
Forum: Java Dec 9th, 2008 |
| Replies: 14 Views: 1,364 import javax.swing.JOptionPane;
public class sentenceStructure
{
public static void main(String[] args)
{
//Get user input
String s = JOptionPane.showInputDialog(null, "Enter more than one... |
Forum: Java Dec 9th, 2008 |
| Replies: 4 Views: 417 [QUOTE]
Thank you so much Peter_budo! You've clarified alot for me. It never fails, but I get so far with Java and then there's always 1 or 2 things that I don't understand.
Again, thank you... |
Forum: Java Dec 9th, 2008 |
| Replies: 4 Views: 417 Wow and thx! - that was a quick response.
But, I'm confused. Can you show me with one of the validations? |
Forum: Java Dec 9th, 2008 |
| Replies: 4 Views: 417 import javax.swing.*;
public class pwVer
{
public static void main(String[] args)
{
String input;
input = JOptionPane.showInputDialog("Please enter password"); |
Forum: JavaScript / DHTML / AJAX Nov 19th, 2008 |
| Replies: 2 Views: 1,532 Never mind - added a few variables and an if clause. Problem Solved! |
Forum: JavaScript / DHTML / AJAX Nov 19th, 2008 |
| Replies: 2 Views: 1,532 Never mind - added a few variables and an if clause and solved the problem. |
Forum: JavaScript / DHTML / AJAX Nov 18th, 2008 |
| Replies: 2 Views: 1,532 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Dynamic Table</title>... |
Forum: JavaScript / DHTML / AJAX Oct 2nd, 2008 |
| Replies: 2 Views: 712 Thanks Essential, you've helped a lot! |
Forum: JavaScript / DHTML / AJAX Sep 30th, 2008 |
| Replies: 2 Views: 712 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Calculate Gas... |
Forum: Java Sep 26th, 2008 |
| Replies: 29 Views: 2,217 Here are the exact instructions-
Write a class that uses a string array object to hold 5 students' names,
an array of 5 chars to hold the 5 students' letter grades,
and 5 arrays of 4 doubles each... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Besides the string array and the array for 5 chars for letter grades, the class was to be written with five arrays of four doubles each to hold each student's set of test scores. I take it that I... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 import javax.swing.JOptionPane; // Needed for GUI
public class JoptionPaneTester
{
public static void main(String[] args)
{
final int STUDENTS = 5;// Number of students
final char... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 JoptionPaneTester.java:27: cannot find symbol
symbol : variable scores
location: class JoptionPaneTester
scores [index] = JOptionPane.showInputDialog(null,"Insert 4 test scores: " +
^... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Do I have to parse the input? |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 I'm no closer, only get more and more errors...
Do I start with the following:
// Get student scores
scores [index] = JOptionPane.showInputDialog(null,"Insert 4 test scores: " +
(index + 1)... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Actually, I was able to solve this first one, but the one that is stumping me is the scores[]...
Is it similar? |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 How do I define "input" ? |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 I've renamed inputValue to inputName and inputScores, which got rid of one error. Now, I only have the "input.next" errors @ 5.
Any other suggestions? Thanks in advance! |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Thank you for your suggestions, as these are good resources; however, I've already searched these links and can't find answers to my errors that follow:
ERROR: inputValue is already in... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Well, two steps closer. I eliminated the repitious output by omitting
for(int i=0;i<names.length;i++)
and then leaving the names[index] in the println code.
And I got my validation to... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Thanks - BUT, now my output has increased to 5 lines of the same data.
Was I to add it after the if,else statements like such?
else
grade = 'F';
for(int i=0;i<names.length;i++) |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Well, I replaced the troublesome code with the following:
[icode]names [index] = input.next();[i/code]
Now, I am able to enter 5 names and their associated scores. However, my output doesn't... |
Forum: Java Sep 24th, 2008 |
| Replies: 29 Views: 2,217 Sorry about not highlighting the compile error. When I make the proposed change, it still won't compile: cannot find symbol at
keyboard.nextString()
^ |
Forum: Java Sep 23rd, 2008 |
| Replies: 29 Views: 2,217 This program is suppose to allow the user to enter a student's name and (4) scores via GUI, instead of Scanner class. The class is to use a String array for 5 names, an array of 5 characters to hold... |
Forum: MS SQL Apr 21st, 2008 |
| Replies: 1 Views: 2,340 As soon as I reviewed this posting, I realized there was an extra "." that did not belong.
rs.Employees.MoveNext
it should be: rsEmployees.MoveNext
Thanks anyway! |
Forum: MS SQL Apr 21st, 2008 |
| Replies: 1 Views: 2,340 The following code coincides with an onClick event on my form to move to the next record in a file, but I keep getting the Error Code: 424, object required. I have (3) other buttons on my form:... |
Forum: Java Apr 11th, 2008 |
| Replies: 6 Views: 662 Thanks for your suggestion, but it resulted in several errors.
I'll keep trying. |
Forum: Java Apr 11th, 2008 |
| Replies: 6 Views: 662 Here's what I've completed for demo.
Can anyone tell me why my average displays as "0"????
Thanks in advance.
import java.util.Scanner; |
Forum: Java Apr 11th, 2008 |
| Replies: 6 Views: 662 Actually, I considered the 1st part done.
Am I wrong?
Thanks! |