List of usage examples for javax.swing JButton applyComponentOrientation
public void applyComponentOrientation(ComponentOrientation o)
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) { } }