Java Code Examples for com.alee.laf.scroll.WebScrollPane#setHorizontalScrollBarPolicy()

The following examples show how to use com.alee.laf.scroll.WebScrollPane#setHorizontalScrollBarPolicy() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ArrivedListPanel.java    From mars-sim with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Constructor.
 */
public ArrivedListPanel() {

	// Use WebPanel constructor
	super();

	setLayout(new BorderLayout());
	setBorder(new TitledBorder(Msg.getString("ArrivedListPanel.arrivedTransportItems"))); //$NON-NLS-1$
	setPreferredSize(new Dimension(200, 200));

	// Create arrived list.
	listModel = new ArrivedListModel();
	arrivedList = new JList<Object>(listModel);
	arrivedList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	WebScrollPane scrollPane = new WebScrollPane(arrivedList);
	scrollPane.setHorizontalScrollBarPolicy(WebScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
	add(scrollPane, BorderLayout.CENTER);
}
 
Example 2
Source File: IncomingListPanel.java    From mars-sim with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Constructor.
 */
public IncomingListPanel() {

	// Use WebPanel constructor
	super();

	setLayout(new BorderLayout());
	setBorder(new TitledBorder(Msg.getString("IncomingListPanel.title"))); //$NON-NLS-1$
	setPreferredSize(new Dimension(225, 200));

	// Create incoming list.
	listModel = new IncomingListModel();
	incomingList = new JList<Object>(listModel);
	incomingList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	WebScrollPane scrollPane = new WebScrollPane(incomingList);
	scrollPane.setHorizontalScrollBarPolicy(WebScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
	add(scrollPane, BorderLayout.CENTER);
}