Paul McKenna

Greenhorn
+ Follow
since Jan 17, 2003
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 Paul McKenna

Basically.. I just scribbled something right out of my mind.. but I hope you get the idea.
HTH
PMc
21 years ago
21 years ago
Yep!
Thank you! I had to override the hashCode method. It worked once that was done
PMc
21 years ago
Hi..
I have the following code

The above code for some reason isnt able to get the value back from the HashMap. I printed out the whole HashMap and I can see that it contains the said key and value. I have also implmented the equals method in the MyKey class but for some reason it is never called (I checked that by putting a println statement in the equals method)
Can anyone find the bug?
Thanks
PMc
21 years ago
Hello,
I have developed a GenericTagListener class which (I Hope..) will help developers who frequently need to use JTrees in combination with other components in their GUI's
Basically the idea is that there are 3 maps
1. Component Map
2. Value Map
3. Component Type Map
In the component map you register a component key with a component. In the value map the listener will automatically register the value of the component in the map. The Component Type map is again done by you.
Please let me know if anyone has any ideas to improve this code.
21 years ago
Use a MouseListener and override the method mouseEntered for each component in the popup. As for the XML file, parse the data beforehand and use it to generate the additional popup menus as desired.
HTH
PMC
21 years ago
Hello,
I would use a JList, but I have very heavy space constraints. So I am forced to use a JComboBox with a renderer to display CheckBoxes.
Is there any listener/event I can override to prevent the combo box from rolling back?
Thanks
PMC
21 years ago
Hello,
I have a JComboBox within which I have embedded JCheckBox components using a ListCellRenderer. It works well except for one problem
Everytime the user selects/deselects an item in the JComboBox the popup rolls back. Hence the user to open the ComboBox for every item that needs to be selected. Is there anyway to prevent the Combo Box from rolling back automatically?
Thanks in advance
Regards
PMC
21 years ago