Andreas Johnsson

Greenhorn
+ Follow
since Nov 07, 2016
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 Andreas Johnsson

Thanks for the welcome

I added repaint(); at line 42 in SSPViewer but it does not update the JLabel text

Do you have any other ideas?
7 years ago
I'm new to Java and I have a very frustrating problem.

We have a college assignment and the task is to create a "Rock, paper, scissor" game with five different classes.
The classes are: SSPMain, SSPPlayer, SSPViewer, SSPController and SSPUserInput.

The problem I have is that the text in the JLabel "humanSelectionLabel" (SSPViewer) is not changed to "Rock" after I have clicked on the JButton "rockButton" (SSPUserInput).
I have added a System.out.println in the method which receives the selection-String and it prints "Rock", so the method receives what it should but the setText instruction does not work.

SSPMain


SSPPlayer



SSPViewer



SSPController



SSPUserInput
7 years ago