• Post Reply Bookmark Topic Watch Topic
  • New Topic

beginner/why can't I see the window

 
ed jones
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
copied this from a tutorial site, but when I run it in Eclipse as an application it minimizes to the task bar, and I never see the window on the screen?


thanks
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to explicitly specify the frame dimensions using the setSize().
If you are new to Swing UI, it might be worth your while to take a look at this http://java.sun.com/docs/books/tutorial/uiswing/components/frame.html
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably better not to use Eclipse if you are just beginning.

When I ran that little class from the terminal, it appeared at the top left of the screen, but (as expected) really tiny. I presume they have a NotQuiteAsTinyWindow class which appears bigger.
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Maneesh Godbole:
You need to explicitly specify the frame dimensions using the setSize().

For frames and dialogs I prefer pack(). It sets the size to be the preferred size but does a lot more as well.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!