posted 21 years ago
Hello
i am trying to give another shape (a polygon other than a square) to a JButton by creating another ButtonUI. I am however encountering some problems
1. The fillPolygon(myPolygon) from Graphics does not seem to work when i am trying to paint the new shape. However a drawPolygon(myPolygon) and a fillOval(0, 0, width, height) do work.
2. When the frame containing the JButton is resized, there are traces of the outline of the button (from a call to drawPolygon()) for all the sizes that the button is while the frame is being resized.
Would anyone have an idea of what i could be doing wrong or missing. Thanks in advance.
Here is the code i am using in case it might be helpful:
regards Vik
[ January 16, 2003: Message edited by: vik nuckchady ]