There's no secret sauce or handshake, Vulcan mind meld, or shortcut to acquiring the skills and confidence in using them. It's all practice, practice, and more practice. Reading the books doesn't...
Type: Posts; User: GregBrannon
There's no secret sauce or handshake, Vulcan mind meld, or shortcut to acquiring the skills and confidence in using them. It's all practice, practice, and more practice. Reading the books doesn't...
You made good progress and were almost there. You're getting frustrated. I made some minor changes with comments plus a few others I can't help making. (It's an OCD thing.) Let me know if you have...
Are you meaning to use the paintComponent() method? Please properly post actual code, copied and pasted. Guessing at what you meant to post when typos are involved is just wasting time.
Also,...
There is some simple math involved:
Read the row/column sliders
Determine the size of the drawing area
Divide the appropriate dimension of the drawing area into an equal number of rows/columns...
It's not clear how you applied what you 'learned' in the lesson to your project. Can you clarify?
Java Custom Painting Lesson.
I don't think you're really wanting to do anything 'randomly,' and adding JLabels to a component is not the same thing as dividing a component's area into grids.
Are you saying the slider along...
Can you explain better what the program is supposed to do? Right now, it adds 2 labels to panelBoxes each time a slider changes. I'm assuming that's a building block to where you'd like to go, so...
Adding components to a container "on the fly" isn't the recommended approach, but if you're set on it, then validate() the container after adding.