Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

OOP Form (Urgent)  RSS feed

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Im having a really hard time getting my Application going with display. What I want to do is simply if a Command is pressed, Then i want to a Form to be displayed. In the new Form I want to be able to append TextFields etc. I would prefer that the Form is located in an external class-file (like FormMildet.java). Something like this
and FormMildet.java looks like something like this

Problem is I cant get the new form to be dispalyed. And if get it to be displayed (proboely the wrong way), Im always getting some error when I try to append a TextField. Can anyone help me perhaps?
[ April 30, 2004: Message edited by: Sebastian Green ]
 
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you do

what kind of errors are you seeing?
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then Im getting the famous "cannot resolve symbol".. Strange... Im getting the same error using Im ony getting it to work when i use this Where MainForm is an form with public rights in the MyForm-class. This inst a OOP solution. But even then when I try to appand TextFields to MainForm Im getting error when launching that section of the application, no compiler error.. Im getting this error Any ideas?
[ May 01, 2004: Message edited by: Sebastian Green ]
[ May 01, 2004: Message edited by: Sebastian Green ]
 
Sebastian Green
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind my problems with Textfields. To make short story shorter, my bad! But Im still having problems with displaying my external Form.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method 'getDisplay' is a static method of the class 'Display' - you don't need to call it through an object reference. So:

is correct.
Perhaps this makes things a little clearer:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!