SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
When they click on the button I want to create a new window and get rid of the first window.
luck, db
There are no new questions, but there may be new answers.
Darryl Burke wrote:
When they click on the button I want to create a new window and get rid of the first window.
Two better approaches are --
use a model JDialog use a CardLayout
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:
Darryl Burke wrote:
When they click on the button I want to create a new window and get rid of the first window.
Two better approaches are --
use a model JDialog use a CardLayout
Thanks Darryl. What is better or what are the benefits of using a JDialog?
More info here http://download.oracle.com/javase/tutorial/uiswing/components/dialog.htmlA Dialog can be modal. When a modal Dialog is visible, it blocks user input to all other windows in the program
Maneesh Godbole wrote:
Darryl recommended modal not model.
luck, db
There are no new questions, but there may be new answers.
Maneesh Godbole wrote:One important point to remember is that the main UI is already showing, but the operation cannot proceed without the user interaction.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Maneesh Godbole wrote:I think CardLayout will fit the bill for your requirement.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Ranganathan Kaliyur Mannar wrote:I think your case is similar to the usual situation of asking login credentials in a small window - if login is successful, you show the main application. If not, you show an error message in red. I think JDialog suits the best. I would have the small database selection window as a JDialog. And then launch the main application if connection is successful.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Sean Keane wrote:So what happens when the user enters incorrect information and clicks on the "OK" button? The JDialog disappears?
Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
SCJP (1.4 | 5.0), OCJP (6.0), OCMJD
Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|