Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing GUI Interface Question

 
Rebecca Plumb
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have to create a gui interface, that doesn't have any backend functionality. It is supposed to be similiar to an address program like outlook. I have implemented all of the components except 1 - I have to display a person in the contacts/organizer. I have to create a static array & a person contstruct. Where would I place this? Inside Contact form in the text fields?

Here is the code:




[ June 02, 2008: Message edited by: Campbell Ritchie ]
 
Rob Spoor
Sheriff
Pie
Posts: 20552
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rebecca,

please UseCodeTags in the future.

Can some bartender move this to Swing?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49456
64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Morning.

Why are you assigning your static Strings to null? You want

private static final String OPEN = "Open";

or simply write "Open" where you need it.

I think your Person needs a separate class; keep your "model" and your "view" in separate classes.

Are you using FlowLayout? Watch the behaviour of your GUI if you resize it from left to right.

And Rob is right; I was going to move you to Swing anyway. Because I am feeling in a benign mood I shall add code tags so you can see how much easier it is to read.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic