When I put this code between my script. It didn't work. I suppose to put a number in the input, but If I didn't put anything in the INPUT BOX, then the Error Should display.
if( Cost.getText().length() == 0 )
{
JOptionPane.showMessageDialog( null, "Cost required",
"Input Required", JOptionPane.WARNING_MESSAGE );
return;
}
if( Hours.getText().length() == 0 )
{
JOptionPane.showMessageDialog( null, "Hours required",
"Input Required", JOptionPane.WARNING_MESSAGE );
return;
}