olá, pessoal!
tentamos a funcioamento pelo espaços das botões da barra e não funcionou direito, espaço fica o longa, quero pequeno espaços, veja os código

[/code]
private Component getpainelTopo(){
//criar a barra dos botões
JToolBar panelTopo = new JToolBar();
panelTopo.setFloatable(false);
// criar o botao com image.
JButton bt1 = new JButton( new ImageIcon(getClass().getClassLoader().getResource("confirmar.png")));
bt1.setToolTipText("Confirmar");
bt1.setActionCommand("Incluindo");
bt1.setName("bt1");
bt1.addActionListener(this);
panelTopo.add(bt1);
//ficar espaco entre os botões.
JPanel esp1 = new JPanel();
esp1.setPreferredSize(new Dimension(1,10));
panelTopo.add(esp1);
JButton bt2 = new JButton(new ImageIcon(getClass().getClassLoader().getResource("antes.png")));
bt2.setToolTipText("Antes");
bt2.setActionCommand("Antes");
bt2.setName("bt2");
bt2.addActionListener(this);
panelTopo.add(bt2);
JButton bt3 = new JButton(new ImageIcon(getClass().getClassLoader().getResource("depois.png")));
bt3.setToolTipText("Depois");
bt3.setActionCommand("Depois");
bt3.setName("bt3");
bt3.addActionListener(this);
panelTopo.add(bt3);
return panelTopo;
}
Aguardo a sua responda…