Java Code Examples for javax.swing.JScrollPane#setAlignmentY()

The following examples show how to use javax.swing.JScrollPane#setAlignmentY() . 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: PRViewer.java    From gate-core with GNU Lesser General Public License v3.0 5 votes vote down vote up
protected void initGuiComponents(){
  setLayout(new BorderLayout());
  editor = new ResourceParametersEditor();
  editor.setEditable(false);
  editor.setAutoResizeMode(XJTable.AUTO_RESIZE_LAST_COLUMN);
  JScrollPane scroller = new JScrollPane(editor);
  scroller.setAlignmentX(Component.LEFT_ALIGNMENT);
  scroller.setAlignmentY(Component.TOP_ALIGNMENT);
  add(scroller, BorderLayout.CENTER);
}