File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Swing Polish or Not to Polish Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Swing Polish or Not to Polish" Watch "Swing Polish or Not to Polish" New topic

Swing Polish or Not to Polish

Javini Javono
Ranch Hand

Joined: Dec 03, 2003
Posts: 286
If you visit this web site
and scroll to the bottom of the page, you will see a partial
Java JDialog for my project (I have obscured some sections
of the dialog which are not related to my question).
Question 1
There are two buttons, "Remote" and "Local", and these buttons are not
exactly the same width. Should I be concerned about this and make changes
so that their widths are absolutely identical in pixels?
Question 2
Within the labeled border called "Local", I use two BoxLayouts. Each line is a horizontal
box, and each line contains a radio button and then the filename. You will notice that
the TextField's representing the filenames do not line up exactly. Should I be concerned
about this and change to another layout manager which would line them up exactly?
Javini Javono
Philippe Maquet

Joined: Jun 02, 2003
Posts: 1872
Hi Javini,
I personally care for perfect alignments, equal sizes of related visual objects (buttons among others) and visual "balance" of my screens layouts. In other words, I do care for making my screenns "nice".
  • It's a subjective area
  • I'm perfectionnist to death!

  • So I am as interested as you to know how other people are concerned by your questions.
    Ranch Hand

    Joined: Nov 22, 2008
    Posts: 18944
    I send you two big YES for both question! I have the same reasons as Phil...
    However, to me this has nothing to do with perfectionism at all. It is just common sense. Look at the UI of your favourite software (OS, office products, you name it) - they all take care of such "details".
    Btw, I kinda like the idea of using a BoxLayout! I just wonder what the second text field in local mode is for???
    Javini Javono
    Ranch Hand

    Joined: Dec 03, 2003
    Posts: 286
    I just wonder what the second text field in local mode is for???
    The user can connect locally to one of two database types (having
    support for multiple databases is not required for the project,
    Javini Javono
    Yanick Labelle
    Ranch Hand

    Joined: Dec 29, 2003
    Posts: 50
    Hi, for almost all of my forms, I use a mix of GridBagLayouts frequently included in the NORTH, CENTER, or SOUTH slots of a BorderLayout.
    I personnaly think that the GridBagLayout is the most powerfull layout available. And also the most complicated. But all of my components are exactly where they are supposed to, and this layout also does an excellent job when you resize your window, if you provide the good constraints.
    I agree. Here's the link:
    subject: Swing Polish or Not to Polish
    It's not a secret anymore!