java call to gui opens tiny window

I have created a small gui window and I am tryin to call it from another class but when I call it from the other class, just a tiny sliver of a window opens.

If I run it from within the gui class it opens up correctly.

I am attaching both classes. Can someone tell me what I'm doing wrong please?
AppWindowTest.java
Default.java
boukakaAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
This is what should happen when you follow my instructions:

The calling code is
AppWindowTest window = new AppWindowTest();
window.setVisible(true);

Open in new window

0
 
CEHJCommented:
Your variable called 'frame' is redundant (AppWindow IS a frame) and causes problems. Get rid of it
0
 
boukakaAuthor Commented:
When I remove 'frame' the window opens tiny from both classes....that's even worse....
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
boukakaAuthor Commented:
That is exactly what I did and it resulted in a tiny useless window
0
 
CEHJCommented:
Then you must have done it wrong
0
 
boukakaAuthor Commented:
Did you try to run it? The classes stand on their own so you could if you want to see what I'm seeing. Change the window.frame.setVisible(true) to window.setVisible(true) and run it... there must be something else creating that weird behavior
0
 
CEHJCommented:
Did you try to run it?
?? I've just posted a link to a screenshot of it running (properly)
0
 
boukakaAuthor Commented:
Well that's just nuts, this is what I see and you can see that I have adjusted the code...I'm baffled
0
 
boukakaAuthor Commented:
crap - no attachment, internet here is too slow...
0
 
boukakaAuthor Commented:
crazy, well I will accept your solution as correct because I believe that what you are saying is the right way to run it. There must be something wacky going on with my environment...
0
 
CEHJCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.