Solved

java call to gui opens tiny window

Posted on 2014-01-23
11
251 Views
Last Modified: 2014-01-23
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
0
Comment
Question by:boukaka
  • 6
  • 5
11 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 39803592
Your variable called 'frame' is redundant (AppWindow IS a frame) and causes problems. Get rid of it
0
 

Author Comment

by:boukaka
ID: 39803616
When I remove 'frame' the window opens tiny from both classes....that's even worse....
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 39804100
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
 

Author Comment

by:boukaka
ID: 39804278
That is exactly what I did and it resulted in a tiny useless window
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39804288
Then you must have done it wrong
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:boukaka
ID: 39804301
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 39804305
Did you try to run it?
?? I've just posted a link to a screenshot of it running (properly)
0
 

Author Comment

by:boukaka
ID: 39804369
Well that's just nuts, this is what I see and you can see that I have adjusted the code...I'm baffled
0
 

Author Comment

by:boukaka
ID: 39804376
crap - no attachment, internet here is too slow...
0
 

Author Comment

by:boukaka
ID: 39804387
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 39804698
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
changeXy challenge 13 57
noX challenge 17 76
What is JNDI datasource in spring 1 38
topping1 challenge 7 51
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now