identifier expected

I am setting image icon to button but getting

following error

identifier expected

my code is as

private JButton copy = new JButton(new javax.swing.ImageIcon(getClass().getResource("/images/copy2.jpg")));

private JButton delete = new JButton(new javax.swing.ImageIcon(getClass().getResource("/images/delete5.jpg")));

private JButton rename = new JButton(new javax.swing.ImageIcon(getClass().getResource("/images/rename2.jpg")));

private JButton makedir = new JButton(new javax.swing.ImageIcon(getClass().getResource("/images/dir2.jpg")));

copy.setToolTipText("Copy File or Directory");

delete.setToolTipText("Delete File or Directory");

rename.setToolTipText("Rename File or Directory");

makedir.setToolTipText("Make New Directory");

help plz

[823 byte] By [it_shailua] at [2007-11-27 4:51:36]
# 1
Can you post the stack trace and executable part of code?
AnanSmritia at 2007-7-12 10:05:22 > top of Java-index,Desktop,Core GUI APIs...
# 2
thanks for reply i got answer I was setting tooltipTextoutside constructorinside constructor its working fineThanks again
it_shailua at 2007-7-12 10:05:22 > top of Java-index,Desktop,Core GUI APIs...