<div><pre class="java" name="code">ImageIcon searchm=new ImageIcon("s2.png");
JButton search=new JButton("搜索",searchm);
search.setVerticalTextPosition(JButton.BOTTOM);
search.setHorizontalTextPosition(JButton.CENTER);
<div><pre class="java" name="code">ImageIcon searchm=new ImageIcon("s2.png");
JButton search=new JButton("搜索",searchm);
search.setVerticalTextPosition(JButton.BOTTOM);
search.setHorizontalTextPosition(JButton.CENTER);