Identifier Expected....
[codepublic class DeleteWindow
{
public class DeleteWindow
{
int response = JOptionPane.showConfirmDialog(null,"Are you sure?","Delete?",
JOptionPane.YES_NO_OPTION);
if(response == JOptionPane.YES_OPTION)
{
JOptionPane.showMessageDialog(null,
"The account has been deleted","Deleted",null);
}
} //Identifier expected here, anyone know?
[code]
Anyone know?
[442 byte] By [
Kelbaa] at [2007-10-2 16:04:34]

public class DeleteWindow
{
int response = JOptionPane.showConfirmDialog(null,"Are you sure?","Delete?",
JOptionPane.YES_NO_OPTION);
if(response == JOptionPane.YES_OPTION)
{
JOptionPane.showMessageDialog(null,
"The account has been deleted","Deleted",null);
}
} //Identifier expected here
Sorry about my messed up post, but anyone know
Kelbaa at 2007-7-13 16:40:24 >

I'm not sure what you're trying to do, here's a possibility. Your code is missing a method, and the parameters to the second option pane are invalid.
import javax.swing.JOptionPane;
public class DeleteWindow
{
int response;
public DeleteWindow()
{
response = JOptionPane.showConfirmDialog(null,"Are you sure?","Delete?",
JOptionPane.YES_NO_OPTION);
}
void test()
{
if(response == JOptionPane.YES_OPTION)
{
JOptionPane.showMessageDialog(null,
"The account has been deleted","Deleted",JOptionPane.INFORMATION_MESSAGE);
}
}
public static void main(String[] args)
{
DeleteWindow run = new DeleteWindow();
run.test();
}
}