訊息視窗

int ans=JOptionPane.showConfirmDialog(null,"xxxx","系統訊息",JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
if (ans==JOptionPane.YES_OPTION){

}else if (ans==JOptionPane.NO_OPTION){

}

JOptionPane.showMessageDialog(null,"必填欄位不可空白。","訊息",JOptionPane.ERROR_MESSAGE);

0 Comments:

Post a Comment




 

Copyright 2006| Blogger Templates by GeckoandFly modified and converted to Blogger Beta by Blogcrowds.
No part of the content or the blog may be reproduced without prior written permission.