File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Motif, Metal or Window ??????????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Motif, Metal or Window ???????????" Watch "Motif, Metal or Window ???????????" New topic
Author

Motif, Metal or Window ???????????

Gurpreet Saini
Ranch Hand

Joined: Jun 09, 2002
Posts: 295
Hi reader,
Shall I use the default Metal for my main client gui ?. Or provide a option for the examiner on menu with different PLAF's. Secondly, do we require any decoration of gui for example my client gui background color is yellow. These sort of things or shall I left it plain (default : Metal). Thirdly, most important thing is that my schema is covering all of the gui from left to right. Still after covering all of the frame "destination airport" does not fits in its house. The word "airport" is invisible but destination is visible, rest of all the columns are fit. For this I had used nested panel approach and now I am using GridLayout for the table. What do you suggest shall I use FlowLayout ?. But the problem in using FlowLayout is all the schema shrinks and one cannot read the columns. Please give your opinions. Waiting for you letters.
Thank you,
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Gurpreet,

Shall I use the default Metal for my main client gui ?. Or provide a option for the examiner on menu with different PLAF's. Secondly, do we require any decoration of gui for example my client gui background color is yellow. These sort of things or shall I left it plain (default : Metal).

These things are probably not worth the amount of time you would have to put into them. Besides, I think the Metal is a pretty good choice in the first place. Changing colors is probably OK so long as your GUI doesn't wind up suffering from "Clown Foot" syndrome or look like the bird of paradise when you're done.

Thirdly, most important thing is that my schema is covering all of the gui from left to right. Still after covering all of the frame "destination airport" does not fits in its house. The word "airport" is invisible but destination is visible, rest of all the columns are fit. For this I had used nested panel approach and now I am using GridLayout for the table. What do you suggest shall I use FlowLayout ?. But the problem in using FlowLayout is all the schema shrinks and one cannot read the columns.

A very considerable amount of my time in developing the client GUI involved sizing the individual columns and table so all fit on the screen and each column had just enough room with a little buffer added. First of all you should shorten the names on the column headers. I created an interface called FBNConstants which was really just a C-style struct. There was a String[] for the schema defined there as well as a String[] for the headers. There were also constants defined for the field positions such as FLIGHT, ORIGIN, CARRIER, etc. such that SCHEMA[ORIGIN].equals("Origin airport") and HEADERS[ORIGIN].equals("Origin"). As for layout, I just wrapped the table in a JScrollPane and put that at BorderLayout.CENTER on the GUI content pane.
Sizing the individual columns involves some work, but I feel that it is a worthwhile endeavor.
Hope this helps,
Michael Morris


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

I'd keep it at it's defaults, as we all say, why add time to your development on something that is not necessary or required.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
George Lawniczak
Greenhorn

Joined: Aug 12, 2002
Posts: 27
I basically did what Michael did, only in my case I used Resource bundles, to link the Schema names to the labels. I figure that way, I am not re-inventing the wheel, and as a bonus, I facilitate I18N (not that it's a requirement, but nevertheless I thought it was a good idea).
 
jQuery in Action, 2nd edition
 
subject: Motif, Metal or Window ???????????