Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Jason Newman

Ranch Hand
+ Follow
since Oct 20, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jason Newman

The part where it tells you how to assign int variables for the buttons. As in "Blarg" is clicked then you have selected the value of '1' so then you go ----> here. Or is "blah" is click then go ------>here.

Are you getting my issue?
11 years ago
Okay. It runs, which makes me happy. So, one more question: How do I assign these buttons values? As in if one button is clicked, then you selected choice one, which therein goes to... Ect. Help?
11 years ago

Kevin Workman wrote:Read this:

I have a custom button made: But now how do I make the options pane show it?

JOptionPane panel = new JOptionPane();

JButton ship = new JButton("Ship a box");

panel.showMessageDialog(null, "Welcome to the Post Office, how may I help you?", "Welcome!",panel.);

It should say panel. something to show to button 'ship'
11 years ago
Hey, how do you make buttons on the JOption Pane? I know how to do it with the frame, but I am trying to make custom buttons for this pane. Like for example: Print out: How may I help you?" Button one :I'd like to ship, Button two: Uhh... Nevermind.

Please help?
11 years ago
String santa;

He is real now.
11 years ago

Campbell Ritchie wrote:Why are you mixing Scanner and JOptionPane? You can read text with the methods of Scanner too.
Try a few lines with Scanner, getting ints and Strings in turn, and see how it works. Beware that Scanner can appear to miss out an entry if you have a return. Look at this old post, complete with spelling errors.

What would you recommend that I display this eight ball on if not the JOptionPane? And I still can't get it to run right.
11 years ago
So, I changed the ode around and it will compile, with the change to the if || statment that the other JN gave me. But, the problem now is that it will show up in the pane with "Do you want to make a wish?" and if you type yes || no it freaks out and pritns an empty imput box into the console. If you type in it,... Well... java.util.InputMismatchException
at java.util.Scanner.throwFor(Unknown Source)
at Source)
at java.util.Scanner.nextInt(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at EightBallTEST.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(

I think we may have a problem.
11 years ago
... But I'm not exactly sure. I know that the scanner scans input and then determines what to do. So, I have set up an if statement to.... You know what, the code speaks louder than words.

So basically I'm trying to make my eight ball program ( original: better by it asking you if you want to make a wish or not. Then the if statement sets the variable of test to 1 for yes, 2 for no. Yet, it won't work. Please help?
11 years ago
I feel stupid, but no I don't. Not at all. Not even a little.
11 years ago

There's 10 kinds of people in this world. Ones who understand binary and ones who don't.

Programmers seem to lose it bit by bit.

Two strings walk into a bar and sit down. The bartender says, “So what’ll it be?”
The first string says, “I think I’ll have a beer quag fulk boorg jdk^CjfdLk jk3s d#f67howe%^U r89nvy~~owmc63^Dz x.xvcu”
“Please excuse my friend,” the second string says, “He isn’t null-terminated.”

An SQL Query walks into a bar, goes up to two tables and asks "Can I join you?"

// No comment.

If you put a million monkeys at a million keyboards, one of them will
eventually write a c++ program. The rest of them will write Perl programs.

Those are all the ones that I read that made me laugh. Just thought I would post these and see if I can make anyone laugh.
11 years ago
Not a big fan of enterprise Java...
11 years ago
This is my first attempt to turn some of my programs into applets for my class portfolio project for WebDesign. I'm going to take some programs and turn them into applets to be used and what not. I've never done this before, and all help will be greatly appreciated. Also here is the code and exejars for my programs.


Tic-Tac-Toe with AI(Code only, I couldn't get this into a jar)

Color Chooser

Thank you!
11 years ago
Is it just me, or is the Bear/Moose picture awesome??
11 years ago