B4J Library jRLDialogsX - Dialogs Library

Discussion in 'B4J Libraries & Classes' started by rwblinn, Mar 30, 2015.

  1. rwblinn

    rwblinn Well-Known Member Licensed User

    jRLDialogsX is an open source B4J Dialogs Library providing a comprehensive set of Dialogs.
    The library is coded as a B4J Class with Inline Java, no additional libraries or wrappers required.
    Note: Requirements minimum B4J v5.80 and Java JDK v8 (8u40+).

    Version: 1.87
    Download (GitHub) the B4J library, source code, examples and PDF documentation.

    How to Use
    • Copy jrldialogsx.jar, jrldialogsxfiles.jar and xml to the B4J additional library folder.
    • In the B4J project, select jrldialogsx from the B4J IDE Libs tab.
    • See folder Examples - the fullexample is a must read, get started with the InformationDialog.
    Version Control
    20190407 (v1.87)NEW: SimpleFormDialog - DatePicker via option "D";NEW: YesNoCancel dialog - if Cancel text is empty, the cancel button is not created;NEW: ListDialog, ListDialog2 - if DefaultItem = -1 then no item selected;UPD: Documentation & Examples;NEW: Published on GitHub
    20180326 (v1.86)NEW: ListFindDialog Set or get content of textfield FindItem
    20180312 (v1.85)NEW: DidYouKnow2 dialog with prev / next tip buttons; NEW: ExtendedDialog Show or hide the less details hyperlink button; UPD: ListFindDialog search field across dialog window, moved buttons OK & cancel down; UPD: Documentation & Examples. See Post #73
    20171025 (v1.80)NEW: jRLDialogsXFiles.jar holding additional files from the library Files folder. This file must be located in the B4J Additional Libraries folder.; NEW: ListFindDialog with a find item option - first non Inline Java Dialog (requires jRLDialogsXFiles.jar); UPD: Icons (for dialogs DidYouKnow and LoginDialog2) are included in jRLDialogsXFiles.jar; UPD: LoginDialog and Login2Dialog2 with textfield horizontal grow option; UPD: Documentation & Examples. See Post #60
    20170906 (v1.77)UPD: SimpleformDialog set request focus on first field; UPD: Minor changes
    20170822 (v1.76)NEW: Library renamed from jRLDialogs8 to jRLDialogsX; UPD: Minor changes
    20170802 (v1.75)NEW: PDF Documentation
    20170711 (v1.74)NEW: SimpleFormDialog ComboBox Field with field value comma separated string, SimpleFormDialog Property ComboBox editable; UPD: Examples. See Post #60
    20170703 (v1.72)NEW:ToastMessageAlert Information,Warning,Error; MessageHTMLDialog3 with OK/Cancel, MessageHTML show/hide details button; UPD: Examples. See Post #58
    20170626 (v1.68)NEW:MessageDialog set wrap;SimpleFormDialog set inputfield width;MessageHTMLDialog2;Overview;UPD:Examples. See Post #56
    20170620 (v1.65)NEW:Localization Show Details Hyperlink Button for Dialogs Extended, Message, MessageHTML; NEW: Extended Dialog option Message & MessageHTML Dialogs;UPD: Examples. See Post #55
    20170612 (v1.62)NEW:SliderDialog; NEW:SimpleFormDialog CheckBox Field; NEW: Extended Dialog option show content expanded; NEW: DoNotAskAgainDialog; UPD: Fields padding removed; UPD: Examples. See Post #53.
    20170601 (v1.59)NEW:SimpleFormDialog TextArea Field, option to split form fields; FIX: ConfirmDialog; UPD: Examples. See Post #50.
    20170531 (v1.58)NEW:ToastMessage set background and border line color; UPD: Examples. See Post #49.
    20170530 (v1.57)NEW:ColorNameDialog and ColorPickerDialog to get Color as Paint; NEW:ToastMessage set font size and border width; UPD:Toastmessage using default colors; UPD:Examples. See Post #47.
    20170528 (v1.56)NEW:SimpleFormDialog (create n label:field pairs; field=Text or Password or Numeric); MultiInputFieldDialog (create n label:textfield pairs); IntegerInputDialog; Full Example reworked. See Post #46.
    20170525 (v1.53)NEW:TimePicker (24h), TimePicker (12h), TextInputDialog4 (with option to set the width of the textfield, no label used); More examples. See Post #44.
    20170522 (v1.50)NEW:String localisation Username Label/Prompt, Password Label/Prompt, OK/Cancel Button, YES/NO Button, Login Button, Select Button. See Post #42.
    20160801 (v1.47)UPD:Set default selected item for ChoiceDialog, SelectDialog, ListDialog, and ListDialog2; Example 1 converted to B4J Visual Designer.
    20160411 (v1.46)UPD:MessageHTMLDialog handles anchors if defined like href="#myanchor" ... name="myanchor" ...
    20151011 (v1.45)UPD:Textfield gets initial focus when openeing dialog TextInputDialog, TextInputDialog2, TextInputDialog3, LoginDialog, LoginDialog2, TextAreaDialog
    20150910 (v1.4)NEW:SetParentWindow; FIX: ToastMessage center screen
    20150828 (v1.3)NEW:ToastMessage
    20150604 (v1.2)NEW:TextAreaDialog
    20150617 (v1.11)UPD:TextInputDialog3 added hint for checking null
    20150512 (v1.1)NEW:TextInputDialog3
    20150406 (v1.0)NEW:SpinnerIntegerDialog, SpinnerDoubleDialog, SpinnerListDialog
    20150405 (v0.9)NEW:TextInputDialog2, DatePickerDialog
    20150404 (v0.8)NEW:SelectDialog; FIX: ListDialog, ListDialog2 removed expand option
    20150403 (v0.7)NEW:ListDialog, ListDialog2
    20150402 (v0.6)NEW:LoginDialog2, DidYouKnowDialog, ExceptionDialog, Message, MessageHTMLDialog
    20150401 (v0.5)NEW:ExtendedDialog, LoginDialog
    20150331 (v0.4)NEW:YesNoCancelDialog
    20150330 (v0.1)NEW:First Version

    Simple Example Information Dialog with localized OK Button Text
    Sub Process_Globals
    'Define the dialog using jrldialogsX
      Private Dlg As DialogsX
    End Sub
    Sub AppStart (Form1 As Form, Args() As String)
    'Init the dialog
    'Localize (optional)
      Dlg.OKButtonText = "Thank You"
    'Use the dialog to show Information Dialog
      Dlg.InformationDialog("About""jRLDialogX Information Dialog Example""Find more at www.rwblinn.de.")
    End Sub
    Last edited: Apr 7, 2019
    fredo, aeric, Johan Hormaza and 29 others like this.
  2. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150401 - Post #1 lists all the methods.
    NEW: YesNoCanceldialog
    NEW: Extendeddialog
    NEW: Logindialog
  3. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150402 - Post #1 lists all the methods.
    NEW: LoginDialog2
    NEW: DidYouKnowDialog
    NEW: ExceptionDialog
    NEW: MessageDialog
    NEW: MessageHTMLDialog
    ellpopeb4a likes this.
  4. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150403 - Post #1 lists all the methods.
    NEW: ListDialog
    NEW: ListDialog2
  5. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150404 - Post #1 lists all the methods.
    NEW: SelectDialog
    FIX: ListDialog, ListDialog2 removed expand option
  6. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150405 - Post #1 lists all the methods.
    NEW: TextInputDialog2
    NEW: DatePickerDialog
    Last edited: Apr 5, 2015
  7. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150406 - Post #1 lists all the methods.
  8. Phayao

    Phayao Member Licensed User

    That looks very nice but I got the following error during compilation:

    B4J version 2.80
    Parsing code. 0.10
    Compiling code. 0.22
    Compiling debugger engine code. 4.31
    Compiling generated Java code. Error
    javac 1.8.0_25
    src\b4j\example\dialogs8.java:13: error: package javafx.scene.control.Alert does not exist
    import javafx.scene.control.Alert.AlertType;
    Note: src\b4j\example\dialogs8.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m

    Any idea what's wrong here ?
    Thanks in advance,
  9. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi Chris,

    thanks for testing.

    To compile this library you need at least Java 1.8.0_40 version as mentioned in the thread.
    Your version is 1.8.0_25 as shown in the error message. Pls check again after upgrading.

    Good Luck
    Last edited: Apr 14, 2015
  10. specci48

    specci48 Well-Known Member Licensed User

    Hi rwblinn,

    a small wish for the TextInputDialog:

    If I close the dialog (via 'X') or I press Cancel, the dialog always returns a blank string "".
    So I can't make out, if the user aborted the input or really entered 'nothing'.

    Is it possible to return 'Null' if the user used Cancel or the close function (via 'X')?
    I want to show an error message only when the user really enters 'nothing' and not wehan he aborted the input.

    Maybe you can add a TextInputDialog3 or something like that so the current users of this great lib don't have to change anything in their current programs.

    Thanks in advance,
  11. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150512 - Post #1 lists all the methods.
    NEW: TextInputDialog3 - handle user cancel by returning null
    specci48 likes this.
  12. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi specci48,

    thanks for your request and the flowers :).
    Pls find update of the library in Post #1. Let me know if this suits your requirement.
    Created using B4J 3.0 beta 5.
  13. specci48

    specci48 Well-Known Member Licensed User

    Hi rwblinn,

    sorry for the delay of my answer.
    TextInputDialog3 works really fine for me. :cool:
    Thank you very much.

    Some small hint to all who want to use this:
    Dim a As String = Null
    If a = Null Then
    Log("This doesn't work...")
    End If
    If a.EqualsIgnoreCase(NullThen
    Log("This works fine!")
    End If
    So you have to use EqualsIgnoreCase instead of = to test for the result of the dialog.

    rwblinn likes this.
  14. Mashiane

    Mashiane Expert Licensed User

    Hi, how does one put a border around the dialogs? mine does not show a border, thus cannot be differentiated clearly from my UI? Can you please advise?
  15. rwblinn

    rwblinn Well-Known Member Licensed User


    this library makes use of the standard JavaFX dialogs Alert etc.. I have not found a way (yet) to change the standard bordercolors of these dialogs.

    Thanks for bringing up.
    Mashiane likes this.
  16. Douglas Farias

    Douglas Farias Expert Licensed User

    hace a chance to add on this lib the toastmsgshow like android?
    show only a pop up mensage for x seconds and close automatic.

    i dont know if this exist native.
  17. rwblinn

    rwblinn Well-Known Member Licensed User

    Update 20150828 - Post #1 lists all the methods.
    NEW: ToastMessageDialog

    Usage - The message can contain HTML Tags (but is optional).
    Sub Process_Globals
    Private Dlg As Dialogs8
    End Sub

    Sub AppStart (Form1 As Form, Args() As String)
        MainForm = Form1
    "<html><h1>Welcome</h1>Many Thanks for using jRLDialogs8</html>"3000)
    End Sub
    ellpopeb4a and Douglas Farias like this.
  18. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi Douglas,

    have added a ToastMessage - see Post#1 and #17.

    An example is included in the zip file - Example3.
    Douglas Farias likes this.
  19. Douglas Farias

    Douglas Farias Expert Licensed User

    lol fast :eek:
    many thx man, very nice work :)
  20. Suntzu

    Suntzu Member Licensed User

    Hi rwblinn,

    Thank you for this amazing library!

    Is it possible to set and/or add the parent form or the dialog's X and Y location? I have three monitors. I run the main form on the 2nd monitor but the dialogs appear on the 1st or main screen. Is there a workaround for this?

    Thank you in advance.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice