I am using the drag-and-drop style of GUI ( I can't write GUI code yet ).
I only know a few function like: setVisible
, getText
, setText
, etc.
But I want to learn all the functions for the buttons or textfields that I can use
I am using the drag-and-drop style of GUI ( I can't write GUI code yet ).
I only know a few function like: setVisible
, getText
, setText
, etc.
But I want to learn all the functions for the buttons or textfields that I can use
If you mean the Swing GUI:
The actual methods you can call and fields you can access in your code are exactly what you'll find in javax.swing in the Java documentation corresponding to the class you're looking at.
For example, if you have a JFrame
, you can find all the methods in javax.swing.JFrame.
Properties are derived from the above Swing methods (mostly in a "remove the 'set' and 'get' manner").
For example, if you have a JFrame
, you might see a background
property in Netbeans, and you can find setBackground
and getBackground
in the documentation.
Bindings seem to be NetBeans specific, but these are also based on the properties.
For example, there's a background
binding and also a background
property.
Events are a bit more complicated - for example, all the mouseX
events correspond roughly to addMouseListener
and addMouseMotionListener
, where the corresponding MouseListener
and MouseMotionListener
parameters has the mouseClicked
, mouseEntered
, etc. methods.
If you mean AWT, I imagine something similar would apply for that (but just taken from the java.awt package instead).
That's not to say every method appears in some form in the NetBeans UI - it wouldn't make sense for something like update to appear there, since that's something you need to decide when to call yourself during runtime.
Whenever you intend to study all the methods of a class, the first thing to check should be the documentation entry of that class (if exists). In general, it should contain some of the methods you are interested about and looking at the documentation entry of the parent class and the parent class of the parent class and so on should reveal all the knowledge you are interested about, therefore, this could be the learning algorithm:
If you already have satisfying theoretical knowledge, but you are not sure about the practice, you might want to create some small sandbox projects to try the things you just learned.