I'm trying to create a feature similar to that of Geogebra's toolbar: it has buttons that select tools, so only one can be selected at a time, but they don't look like radio buttons (a dot, with an inner dot if it's selected); they look like JButton
s with an ImageIcon
.
I've gone through some of the source (specifically ModeToggleMenu.java and Toolbar.java) but still can't quite figure out what's happening. I just need something basic. I would really appreaciate help!
Screenshot of what I mean:
Note the pointer, point, line, perpendicular line, triangle, etc.. That's the effect I'm trying to achieve.
Thanks very much!
Create custom icons then use:
radioButton.setIcon(...);
radioBbutton.setSelectedIcon(...);