Example usage for javax.swing JButton applyComponentOrientation

List of usage examples for javax.swing JButton applyComponentOrientation

Introduction

In this page you can find the example usage for javax.swing JButton applyComponentOrientation.

Prototype

public void applyComponentOrientation(ComponentOrientation o) 

Source Link

Document

Sets the ComponentOrientation property of this container and all components contained within it.

Usage

From source file:uk.chromis.pos.forms.JRootApp.java

private void listPeople() {
    try {/*from  ww w . j  av a2s.c om*/
        jScrollPane1.getViewport().setView(null);
        JFlowPanel jPeople = new JFlowPanel();
        jPeople.applyComponentOrientation(getComponentOrientation());
        java.util.List people = m_dlSystem.listPeopleVisible();

        for (int i = 0; i < people.size(); i++) {

            AppUser user = (AppUser) people.get(i);
            JButton btn = new JButton(new AppUserAction(user));
            btn.applyComponentOrientation(getComponentOrientation());
            btn.setFocusPainted(false);
            btn.setFocusable(false);
            btn.setRequestFocusEnabled(false);
            btn.setMaximumSize(new Dimension(130, 60));
            btn.setPreferredSize(new Dimension(130, 60));
            btn.setMinimumSize(new Dimension(130, 60));
            btn.setHorizontalAlignment(SwingConstants.CENTER);
            btn.setHorizontalTextPosition(AbstractButton.CENTER);
            btn.setVerticalTextPosition(AbstractButton.BOTTOM);
            jPeople.add(btn);
        }
        jScrollPane1.getViewport().setView(jPeople);

    } catch (BasicException ee) {
    }
}