I see that the code will create 2 instances of the mainGui class. Why not just create and use one instance?
Type: Posts; User: Norm
I see that the code will create 2 instances of the mainGui class. Why not just create and use one instance?
Why do you create a new MainGui object in the MainGui class's constructor?
The code you posted will not execute. It does not have a main() method.
Have you stepped through the code to see what it is doing and in what order?
The code has several small methods that do a little bit here and a little bit there making it hard to see what the code...
It should only be called once.
Time to play computer with your program. You need to manually step through the code and see when each statement is executed and what the code is doing.
As an aid you can use the println statement...
How many instances of the mainGui class do you create?
Please post the code in the forum. Not a link
To do a test, I need a small program that compiles, executes and shows the problem.
Not the whole program, a special small testing program that shows the problem.
Can you post a small simple program that compiles, executes and shows the problem?
What you posted won't compile or execute.
Is the action listener method being called when you click on the button? To see, add a println statement to print a message that shows if it is being called.