Good, if you want to change the color of the button or its style when you mouse over it you should use the methods mouseEntered (MouseEvent event) and mouseExited (mouseEvent) that bring the JComponents .
An example: The background color of the JButton component is changed
JButton buscarButton = new JButton("Buscar");
buscarButton.setBackground(Color.WHITE);
buscarButton.setBorderPainted(false);
buscarButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent arg0) {
buscarButton.setBackground((Color.BLUE));
}
@Override
public void mouseExited(MouseEvent e) {
buscarButton.setBackground((Color.WHITE));
}
});
buscarButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
buscar();
}
});