Mike Suh

Greenhorn
+ Follow
since Jan 12, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mike Suh

Sorry, this is a newbie question, but I dont think anyone in the beginners section knows the answer to this. This is the code that I wrote, but I get a "Variable setText not found in class javax.swing.JTextField" error.
I just want to know how to make a simple random number generating program.
Heres the code:

private void pickRandomNumber()
{
Random randomObject = new Random();
int number = 1 + randomObject.nextInt(6);
jTextField.setText = String.valueOf( number ) ;
}
20 years ago