Java GUI methods

Hi All,

going through the learning process with Java and currently in an internet rabbit hole trying to find the info I know how to find easily in xojo.

the basic functions in a simple GUI.

xojo = textarea.text = “abc123”
java = textarea.settext(“abc123”)

xojo = textarea.appendtext(“abc123”)
java = textarea.append(“abc123”)

etc, I only found the ‘append’ from some random page on the internet but what I can not find is all the GUI elements (buttons, textfield, textarea…) list of methods and properties.

I can find endless lists of common elements (such as append) for some inherited class but nothing that tells me java swing textarea has ‘xxx.append’ ‘xxx.settext’ etc.

it must be in the IDE or on a page somewhere but there is just too much info to spend forever looking and not understanding what is right or wrong!

anyone have any ideas?


Hi Doj you can use the append method- My Texture is named jTextarea1

jTextarea1.append(“String you want to append to it”);

that’s it

I am not really understanding what you want to find? You may help me to understand what you are searching for and I could answer then.

To append the text of a button for example:

mybutton.settext(my button.gettext+“appending String”);

you only have to look which methods the IDE shows up for it. If you have a set text method you can also use before the get text method to get the text and set the text like shown before.

He is asking for a concise “manual” or documentation that lists and explains all methods/properties for each GUI control. With Xojo, you can go to TextArea to get the official documentation on the TextArea control. I have found this type of simple yet thorough documentation lacking in many other tools.

yes @jmadren this is precisely what I am asking, thanks

I would try this one

here you will find the entire documentation. I am sorry that Java Swing has tons of more functionality and cause of this it is more complex than Xojo. But here you will find the most of it

yes, that’s got some more targeted info and I am studying its questionable presentation!

I have also found another way to get each elements attributes from the IDE.
if you type the name in code followed by . then it lists everything that the control can do.

it is still a pain as you are stuck in the IDE but in time it will be easier, just starting out its all unknown!

In the code you can right click and select “Show Java Doc”
Its not built in and takes you to oracles site

The trick with a lot of the doc is you have to pay attention to the headers as some things are inherited from different classes in the hierarchy

And there are a LOT of inherited fields, methods, etc

The nav bar at the top of theScreen Shot 2021-09-16 at 2.19.45 PM
javadoc page is useful


You might want to try one of the DocSet readers.

In my old Dash 2 (DocSet reader, Snippet manager, etc) I can see aTable of Contents and a display of the info, all of which is searchable:

Funnily enough in Dash 6 I can NOT see the Table of Contents. I have just contacted the author to see what is happening there.

You can only go to manual if you are not using 2019R32 on Linux: It has no Offline Documentation and the Online Documentation is only for the actual release. So please forget about Xojo Docs while it is really, really garbage what they are doing. Former Java Release docs are still available. Needed also for refactoring in new Java Versions. But for Xojo this is not interesting. Not professional at all and extremely dangerous for the lifecycle of your Software. So Referring to Xojo documentation makes me really laughing while they are not even a bit interested in correct and standard documentations but Marketing Ideas.

Umm, Thorsten, you are missing the point here. He is looking for documentation for Java that is equivalent to a language reference. He compared it with what he knows from Xojo.

So if you think the documentation for Java is a lot better, then maybe you could point to where it is? Because so far I haven’t found anything good either.

As for Xojo‘s documentation: I actually like it too. That Xojo by now uses it to push people to the latest version is another hare-brained idea that just annoys users and drives them away, but that doesn‘t change that the structure is really good.

As for the content … that could be a lot better. Like working examples etc.

As far as I can see the documentation is relatively good at the Java Site. Let’s look to the Java Doc for Java Swing Button and compare it with Xojo Desktop Button:


And now tell me where Xojo Doc is better then Java. Difference: You have it for all the Java Versions. And it is a bit more Stuff than the Xojo Doc. But okay, maybe I am not able to see while I wear the wrong glasses.

Thanks Markus, I too use Dash with xojo, its my preferred way to view their 19r11 documentation, I will download it.