Oh. Sorry about that. Bad example. Other similar methods tho do have those and nothing is coming out. Anyway. I made a simple three class program that has one JDesktopPane and two windows in it. One calls another. And ofcourse this call doens't work.
Here is the whole code of the program:
JDesktopPane. Which is also holds the main method.
Button windows which is supposed to call label window when button is pressed:
And finaly the label window:
I'am only getting errors when I try to call automically openBtnWindow() at the start of the calss. Why it doesn't work like that but work fine when calling it manually?
Here is StackOverflowError:
It pretty much just repeats the last three lines couple hundred times so I didn't copy all of it.
So. What I'am doing wrong here? Thanks in advance is you are considerate enought to review this code.