I am new to Swing and would like to know how different swing components communicate with each other. What I mean by components could be anything like dialog, panel, frame etc. How a dialog talks to a frame and how a frame talks to a panel etc.
I am using net beans gui builder to get a quick start, and I made an app using JFrame which works fine - added a file chooser and text box which sets the value of text box to the item selected in filechooser, pretty basic.
Now I want to add (not sure what is right here) a login window so that when I launch this application I need my log in window to appear first, authenticate -pretty simple string comparison is good, then my app in the JFrame created.
> I am new to Swing and would like to know how different swing components communicate with each other.
Swing is event-driven
Components listen for events via listeners, and react according to their instruction
in a simple login-screen, the user types in username/password, clicks 'login' (the clicking of the button is an event)
the listener - actionListener (generally), compares the username/password to the db, and if successful,
disposes the login screen then displays the application JFrame (or can return a boolean to the main application)