[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

java call to gui opens tiny window

Posted on 2014-01-23
11
Medium Priority
?
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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
 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

649 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