Viktoriya Kim

Greenhorn
+ Follow
since Sep 27, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Viktoriya Kim

Thank you, Fred Kleinschmidt, for the explanation and your advice!
Thank you, Junilu Lacar. Yeah, there is a mistake ))) I should improve my English. =)
8 years ago
1. Define a class variable "circleColor" in the class "MyDrawPanel" and change it in the method "changeColor". Remove the code which changes the color from the method "paintComponent" to fix this problem.
2. In the inner class "ColorListner" of the class "TwoButtons" call the method "changeColor" which changes the variable "circleColor".
Sorry for my English =) I could make some mistakes.
8 years ago
Thank you. I've already found the solution on this forum.
8 years ago
HI, all. I've started to learn Java and struggled with a task TwoButtons (chapter 12). When I click the button "Change label" it's also changes the color of my circle, it seems that it repaints the JFrame. And when I resize the window, the circle changes the color. I've experimented with the code a little to understand how it works. And I think that if something changes in the window it repaints all the frame. Am I right? Did I something wrong?
Thanks!
8 years ago