I needed a simple MessageBox for a non-UI B4J application.
This is a wrapper of JOptionPane.
http://docs.oracle.com/javase/7/docs/api/javax/swing/JOptionPane.html
I've only implemented MessageDialog and ConfirmDialog. Please let me know if you need others such as input dialog.
It doesn't require any additional libraries.
Real easy to use!
B4X:
Dim i As JOptionPane
Dim response As Int
'0 = Yes
'1 = No
'2 = Cancel
response = i.showConfirmDialog("Yollo","Title",i.optionType_YES_NO_CANCEL,i.messageType_ERROR)
i.ShowMessageDialog(response,"response",i.messageType_ERROR)
Attachments
Last edited: