Using JLabels as Pseudo Buttons

I am currently developing a small to-do list manager and would like to use labels instead of buttons in the context bar. If anyone could provide me with information on how I could do this, I would really appreciate it.

+2


a source to share


1 answer


It might be easier to use JButton. This is what you use

button.setBorderPainted(false)

      



then it will look like a label, but you can still use an ActionListener.

+2


a source







All Articles