-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsg.java
More file actions
26 lines (17 loc) · 793 Bytes
/
msg.java
File metadata and controls
26 lines (17 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package utilerias;
import javax.swing.JOptionPane;
public class msg {
public static boolean yesno(String msg){
int dr = JOptionPane.showConfirmDialog(null,msg,"Confirmar",JOptionPane.YES_NO_OPTION);
return JOptionPane.YES_OPTION == dr;
}
public static void ok(String msg){
JOptionPane.showMessageDialog(null,msg,"Informacion",JOptionPane.INFORMATION_MESSAGE);
}
public static void error(String msg){
JOptionPane.showMessageDialog(null,msg,"Error", JOptionPane.ERROR_MESSAGE);
}
public static void danger(String msg){
JOptionPane.showMessageDialog(null,msg,"Advertencia", JOptionPane.WARNING_MESSAGE);
}
}