B4J Library jOptionPane (MessageBox)

tchart

Active Member
Licensed User
2015-06-12 21_12_49-Title.png


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:

rwblinn

Well-Known Member
Licensed User
Hi,

pls find attached for more examples - the dialogs are defined using JavaObjects in a B4J class. The project is a B4J Non UI app showing as an example the About Dialog.
Have a look if you want to include in your wrapper.

Thanks for sharing.
 

Attachments

Top