Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Jason Newman

Ranch Hand
+ Follow
since Oct 20, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
8
Given in last 30 days
0
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?
8 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?
8 years ago

Kevin Workman wrote:Read this: http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html



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'
8 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?
8 years ago
String santa;

He is real now.
8 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.
8 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 java.util.Scanner.next(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at EightBallTEST.main(EightBallTEST.java:24)
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(JavacCompiler.java:271)


I think we may have a problem.
8 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: http://www.mediafire.com/?kd4ldjdxh3j2n01) 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?
8 years ago
I feel stupid, but no I don't. Not at all. Not even a little.
8 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.
8 years ago
Not a big fan of enterprise Java...
8 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.

Addition: http://www.mediafire.com/file/s2yv22754u5240k/Addition.jar



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



Color Chooser http://www.mediafire.com/file/447zy7c9tqrwd1p/Color%20Slider.jar


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