Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Learning NetBeans JavaForms

 
Jon Richards
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good afternoon!

For quite a while now, I've been hearing good things about the netBeans Java Forms gui designer, so I decided it was about time I learned how to use it. I'm working on transitioning an old undergrad project of mine into the JavaForms format. It's a simple chat client, I'm sure everyone on here has done one at one time or another. All the code is there, I just can't get the JFrame to actually populate when I start the program, it's just a small blank box. I'm sure it's a simple initialization, but I can't figure out where, and why the JavaForms wouldn't do this for me.

Any help would be appreciated, I'm sure it's something stupid I overlooked.


 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



Isn't your frame class named Final?

Edit: Expect Mr Winston to come soon and warn you that your code contains rather long lines.
 
Jon Richards
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh, don't know how I didn't catch that one. Yes I'm porting this new version from my non JavaForm class called "Client".

I'm concerned about this Mr. Winston fellow... I take it he hates long lines? haha. Those were the automatically generated lines by Java Form. I try not to think about them, it hurts my brain.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jon Richards wrote:I'm concerned about this Mr. Winston fellow... I take it he hates long lines? haha. Those were the automatically generated lines by Java Form.

It's against forum rules, as you can see if you read UseCodeTags. Pay attention to this part:
NOTE: Please keep lines inside code blocks under 100 characters. Firstly, it's easier to read; secondly, excessively long lines tend to screw up the windowing, particularly if you don't have very high screen resolutions.


 
Jon Richards
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahh. My apologies. Did not read the code posting rules.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can still edit your original post, it's still not late to split those long lines so the code won't be that wide.
 
Jon Richards
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Crap, the edit option disappeared. My apologies.
 
Campbell Ritchie
Sheriff
Posts: 48386
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jon Richards wrote:Crap, the edit option disappeared. My apologies.
The edit button vanishes a certain time after you post. I have forgotten whether it is 12 hours or 24 hours afterwards. I shall change those long lines for you. The real explanation is that the GUI editor code is meant to be collapsed, and you are not meant to read it. Most of here think you can’t read GUI creator code anyway. I think it is supposed to hurt your brain
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic