I am trying to create a button that has a custom shape (hexagon), but otherwise acts like a normal JButton would (that is, works with an ActionListener).
I have crea
try a Jlabel and use an image for any shape!!
JLabel lbl = new JLabel(""); lbl.setIcon(new ImageIcon("shape.png")); lbl.setBounds(548, 11, 66, 20); contentPane.add(lbl); lbl.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { System.exit(0); } });