Create a JButton with an icon, and set its disabled and pressed images to be the same image, so that 2x versions of the icon work properly.
(String title, String base)
| 603 | * to be the same image, so that 2x versions of the icon work properly. |
| 604 | */ |
| 605 | static public JButton createIconButton(String title, String base) { |
| 606 | ImageIcon icon = Toolkit.getLibIconX(base); |
| 607 | return createIconButton(title, icon); |
| 608 | } |
| 609 | |
| 610 | |
| 611 | /** Same as above, but with no text title (follows JButton constructor) */ |