Here a little Java-like program in B4J. You have to use the library in the JavaSwingLib.zip for it:
The library contains of an XML-file called "javax.swing.xml" and an empty jar-file called "javax.swing.jar".
It think, it is the hundred written jar to (doclet-) xml converter here or so.
But if you are interested at the program, it is Runtime2XML.jar. It only creates xml-files from packages of the Java-runtime.
And if you are interested at the small source file it is in Runtime2XMLsrc.zip.
Greatings
theuserbl
B4X:
Sub AppStart (Form1 As Form, Args() As String)
Dim o As JOptionPane
o.showMessageDialog(Null, "there will be a new window opened", "New Window comes", 1, Null)
Dim EXIT_ON_CLOSE As Int = 3
Dim f As JFrame
f.setTitle("My Window")
Dim p As JPanel
Dim l As JLabel
l.setText("Here comes the Button:")
Dim b As JButton
b.setText("The Button")
p.add(l)
p.add(b)
f.add(p)
f.pack()
f.setDefaultCloseOperation(EXIT_ON_CLOSE)
f.setVisible(True)
End Sub
The library contains of an XML-file called "javax.swing.xml" and an empty jar-file called "javax.swing.jar".
It think, it is the hundred written jar to (doclet-) xml converter here or so.
But if you are interested at the program, it is Runtime2XML.jar. It only creates xml-files from packages of the Java-runtime.
And if you are interested at the small source file it is in Runtime2XMLsrc.zip.
Greatings
theuserbl