G+_Chris McGee (Sturm) Posted March 13, 2014 Share Posted March 13, 2014 So, this community area is probably more for beginner questions, but perhaps I can ask here for a location where I should ask my pretty advanced Java Swing question. After all, I still feel like a newbie, having only had a few weeks to take a crash course in the language. I've tried StackOverflow, DreamInCode, Java.Net, and a few other forums, all without an answer. Or, in the case of StackOverflow, an insufficient answer. Where can I go to get some hand-holding help through my fairly advanced problem? Link to comment Share on other sites More sharing options...
G+_Joe C. Hecht Posted March 13, 2014 Share Posted March 13, 2014 While I rarely ask questions, I have answered a lot of them, and have read an overwhelming number. In my experience in hiring and training tech support engineers, it was never a question about what they knew, but rather how well the could use available resources to find an answer. That being said, and knowing that you have great resources available (such as stackoverflow), I would think you need to sharpen your skills at asking your questions. Try reformulating how you are asking. Look at your question from the other side. Be very clear, and cover everything someone would need to know. Often doing that alone will allow you to answer your own question. I used to have a FAQ on how to ask a question in a technical forum. It is an important subject, and makes all the difference I the world as to the quality, and number of answers you will receive. In short, rephrase and go back to stackoverflow. - TJoe Link to comment Share on other sites More sharing options...
G+_Joe C. Hecht Posted March 13, 2014 Share Posted March 13, 2014 Oh, I should probably mention that some folks will absolutely burn a newbie post in a technical forum. If this happens to you, do not get your feelings hurt, and do not give up. Chances are very high that someone knows the answer to your question, you just need to ask it in a way that will peek the interest of someone with experience. I remember hearing a phrase on "Gilligans Island" once, "if you want to catch a mole, think like a mole". Consider there are some very experienced folks reading though the posts, their time is very valuable, and they skip over most questions leaving them for other to answer because (a) they think its a simple question that they do not have the time to answer or (b) the question was not written up well. Write the question in a way that will encourage the experts to come in and "show off" their knowledge, and that is what will happen. Most tech folks will love any excuse they can find to show off how much they know. I know I do:) So write your question in a way that invites that behaviour. You may find that your well written inquiry may produce miles of writings and debates. Link to comment Share on other sites More sharing options...
G+_Chris McGee (Sturm) Posted March 13, 2014 Author Share Posted March 13, 2014 When I get some more time, I'll try to rephrase my question on Stackoverflow, although I'm not really sure if it will help. The one answer I did receive was from someone who didn't really want to answer. He kept pointing me to an Oracle page that wasn't even about the same thing. But I'll try again, anyway. I just hope SO doesn't delete it citing that it's a duplicate of http://stackoverflow.com/questions/21924846/checkbox-within-a-jxtreetable Link to comment Share on other sites More sharing options...
G+_Joe Maruschek Posted March 14, 2014 Share Posted March 14, 2014 I have almost no experience with Swing and Java. However, looking at the code example that MadProgrammer provided on Stackoverflow, I think I see how he did it in his example. Look for the code about a third of the way down where he has the comment: // Construct the tree Then look a few lines below that where he says: tree.SetCellRenderer( new CheckBoxTreeCellRenderer() ) I think this is part of the magic. CheckBoxTreeCellRenderer looks like it is a custom class that he uses to implement the TreeCellRenderer interface but he makes some changes. Then look about half-way into the code where he defines the CheckBoxTreeCellRenderer: public static class CheckBoxTreeCellRenderer implements TreeCellRenderer That's where he defines the checkbox, and then overrides a method. I think that is where the magic happens. I think the reason why you are seeing a text representation of the checkbox class is that you put the new Checkbox statement where the job class is expecting a string. So you can't put the Checkbox class there. Again, I am in no way an expert, but I hope this points you in the right direction. Link to comment Share on other sites More sharing options...
Recommended Posts