aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Swing GUI Interface Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing GUI Interface Question" Watch "Swing GUI Interface Question" New topic
Author

Swing GUI Interface Question

Rebecca Plumb
Greenhorn

Joined: Dec 09, 2007
Posts: 9
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 ]

Rebecca
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19552
    
  16

Rebecca,

please UseCodeTags in the future.

Can some bartender move this to Swing?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36555
    
  16
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing GUI Interface Question
 
Similar Threads
Creating one class from another
painting problems using JmenuBar
Exception Null
Opening a new window.
coding a texteditor: want to open a separate option window