Here you can find the source of createListButton(Action action)
public static JButton createListButton(Action action)
//package com.java2s; import java.awt.Cursor; import javax.swing.Action; import javax.swing.JButton; import javax.swing.SwingConstants; public class Main { public static JButton createListButton(Action action) { JButton btnButton = new JButton(action); btnButton.setToolTipText(btnButton.getText()); btnButton.setText(""); btnButton.setBorderPainted(false); btnButton.setCursor(new Cursor(Cursor.HAND_CURSOR)); btnButton.setFocusable(false);/*from ww w .j a v a 2 s .c o m*/ btnButton.setHorizontalAlignment(SwingConstants.LEFT); return btnButton; } }