• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem running AWT code

 
John Dell'Oso
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am having problems getting this code to run. It compiles fine, but when I run it as an application it doesn't do anything (and there are no errors). If I run this from within the Eclipse IDE as a JavaBean it works fine. If I try to run it as a java app. it just doesn't show anything. Any ideas as to what the problem may be would be appreciated.

Regards,
WC
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ April 08, 2004: Message edited by: Dirk Schreckmann ]
[ April 08, 2004: Message edited by: Wayne Carey ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Wayne!
The code you've posted does not compile.
It's difficult to help you with runtime issues when the example code won't even compile.
Do you need help with the compiler errors?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After fixing the compiler errors, it becomes apparent that you forgot (or didn't know) to make the frame visible.
Take a look at this adjusted code.Notice that extra line in the main method, tawt.setVisible(true);.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
John Dell'Oso
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for that Dirk. Yes, that was an oversight on my part with setVisible. Sorry about the code not compiling. I must have done something whilst editing the post. Thanks for moving my post to the relevant topic area as well.
Regards,
WC
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic