Of recent I've been undergoing some program design in the area of swing to acquaint myself with java's GUI capabilities. What I'm working at is with the basic intent of practicing to lead to competence and consequently create a basic application. The idea behind the application is a simple one: the components of this application are three. They include, a JFrame and two JDialogs. All three compiled without problems but one of the JDialog that serves as a child to the first did not show up as a result of the event that should have generated it from the first. The application is to make a basic calculation (addition) of a parameter like say 'salaries' from the first JDialog and on clicking the JButton 'ADD', a string displaying an aggregation of the result is expected to be appended to another JDialog emanating from the first. I'll be pasting the source code of both Dialogs on this page. I'll appreciate if someone can help me to figure out the problem and provide the clue. The JDialog that should give the final result didn't show ...I discover that to the appraise the problem better all the code should be pasted here. JFrame code is simply an authenticating code. I had no problems with that... I'll appreciate explanations is need be...
I've added code tags for you to make your code easier to read. Please use them yourself from now on when posting code. I've also moved your post into our GUI forum where the real experts on Swing can take a look at it. Finally, if you can reduce code to the smallest working example that demonstrates your problem, you're much more likely to have people read your question and respond. Thanks!
As Greg implied, that's far too much code for anybody to read. However I just happened to look at the end of it, and noticed line 367. Are you sure you want to do that when the user clicks the "OK" button?
Also, from the design point of view, pop-up dialogs are often annoying and intrusive, so you should try and avoid them if possible. That means that "parent and child" dialogs are especially not a good design choice.
You have almost 30-40 lines of commented in code there...you could have removed that and reduced the size, thus helping us to help you.
As for your problem, in the class CalcDialog, you create a button 'bu', but where are you registering the action listener?
In short, there should be a call 'bu.addActionListener(this)' for your second dialog to appear.