rem /** rem * Sample.bbj rem * This program is similar to the DWC2.bbj program in the parent directory, except rem * that this version uses the BBUtils class to register the Sample.css external rem * stylesheet with the application. rem */ wnd! = BBjAPI().openSysGui("X0").addWindow("Hello BBj DWC", $01101083$) rem add the CSS file dynamically use java.nio.file.Files use java.nio.file.Paths fs! = BBjAPI().getFileSystem() css! = new String(Files.readAllBytes(Paths.get(fs!.resolvePath("Sample.css")))) wnd!.setAttribute("@app-style", css!) wnd!.addPanelStyle("mypanel") st! = wnd!.addStaticText("First Name:") ed_firstname! = wnd!.addEditBox("") st! = wnd!.addStaticText("Last Name:") ed_lastname! = wnd!.addEditBox("") btn! = wnd!.addButton("Say Hello") btn!.setStyle("grid-column","2") btn!.setAttribute("expanse","xl") btn!.setAttribute("theme","success") wnd!.setCallback(BBjAPI.ON_CLOSE,"byebye") btn!.setCallback(BBjAPI.ON_BUTTON_PUSH,"sayhello") process_events byebye: bye sayhello: firstname$=ed_firstname!.getText() lastname$=ed_lastname!.getText() a=msgbox("Hello "+firstname$+" "+lastname$,64,"Hello World") return