>I was looking to see how to implement a dropdown button, but couldn't find any real good solutions on here
I would say, you just didnt look hard enough. Here is my own attempt that already exists, I called it MenuedButton (never mind the name).
Available here: http://www.geocities.com/icewalker2g/
Be sure to check out the screenshots to see the button in action.
Nice little work you have there, however, there should be other ways to work around the 1.4 bug other than letting the user use the default look and feel. Think it through, you just might get it. Have a great day, and once again, good attempt! I'm hoping this wont be your last. Keep it up.
ICE
Nice, I like it. couple quick questions:
1- In your screen shot, are you overriding the paint method for the modified menued buttons?
2- Any particular reason you're not using a BasicArrowButton for your popper button? That way you wouldn't need to have your own paint method, and when you do a set orientation(int location), you could just do a popper.setDirection(int dir) as well.
I guess you're referring to extending JPanel rather than JButton as a way to work around the 1.4 bug- I thought about doing it that way, but wanted the split button to actually BE a button (so it can be passed to methods that expect a button). If there's another way of doing it, I'd sure love to hear it!
The only painting I'm doing is for the popper button's, arrow ie I dont use BasicArrowButton, never knew it existed. The modifications are done by calling bean methods to change the position of the popper button and its arrow direction. I do extend JPanel which avoids the 1.4 bug. I'm may have 2 start posting some code examples on my site soon.