m_sellButton[0].setSize(getWidth(), 35);
m_sellButton[0].setLocation(0, m_cancel.getY() - 35);
m_sellButton[0].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e){
try{
final ConfirmationDialog m_confirm = new ConfirmationDialog("Are you sure you want to sell "
+ m_sellList.getSelectedName() + " for $" + (ItemDatabase.getInstance().getItem(
m_sellList.getSelectedName()).getPrice() / 2) + "?");
m_confirm.addYesListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
GameClient.getInstance().getPacketGenerator().writeTcpMessage("Ss" + ItemDatabase.getInstance()
.getItem(m_sellList.getSelectedName()).getId() + ",");
GameClient.getInstance().getDisplay().remove(m_confirm);
}
});
m_confirm.addNoListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
GameClient.getInstance().getDisplay().remove(m_confirm);
}
});
} catch (Exception e2) {e2.printStackTrace();}