Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Thursday, May 1, 2008

Again on Blog with Java and swing

Hi I'm on blog again, hard to remember, but I guess it's fourth or fifth time I'm starting blogging. Will see how long it will last.

Just because I'm passioned Java developer all blog will be around Java goodness.

At the present time I'm working on swing application for one of my customers. For this project I'm using my preferred libraries jgoodies-looks, jgoodies-forms and jgoodies-validation. It's hard to find something better.

One thing what I like most is a com.jgoodies.forms.builder.PanelBuilder class from jgoodies-forms library. In order to save time and in fashion of DRY I extended PanelBuilder class and got what I needed. Code is small simple, easy to understand and perfect visual result. Nothing extreme but very effective.

public Component getPane() {
initField();

RemisPreviewPanelBuilder builder = new RemisPreviewPanelBuilder();

builder.addRow("Id", id);
builder.addRow("Company title", title);
builder.addRow("Company code", regCode);
builder.addRow("VAT code", vatCode);
builder.addRow("Country", country);

return builder.getPanel();
}


and result is



Of course there is more interesting Swing UI builders such as RemisDeleteViewPanel and RemisEditViewPanel.