How i can add icon (car, earth or other) image that can be clickabel by user? i want to add them on an jpanel with overrided paint method.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Just use a JLabel with an icon. Then add a MouseListener to listen for clicks.
The easiest way is to add an Icon to a JButton, then you can use an ActionLlistener to handle the mouse click. You can also use:
to get rid of the border so it looks like a label.