Hi there, Does anybody know if there's a technique for storing/reading values in hidden fields on a Swing form, similarly to how hidden input fields work in HTML? I just tried using a JTextField, which I simply set invisible by calling setVisible(false). It worked perfectly for me, but I'm just not 100% sure if this technique is clean enough and there will be no unwanted side effects etc.
The architecture behind Swing is the idea of model-view-controller. The Model contains the data. The View presents one possible representation of the data. Want "hidden" fields? Code the View so that it does not show them. Hidden fields in HTML are a kludge to preserve data because HTTP doesn't persist data between requests. They are not necessary when working with Java/Swing as it has more sophisticated functionality.