List of usage examples for javax.swing JScrollPane setBorder
@BeanProperty(preferred = true, visualUpdate = true, description = "The component's border.") public void setBorder(Border border)
From source file:VASSAL.configure.TextConfigurer.java
public java.awt.Component getControls() { if (p == null) { p = new JPanel(); p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS)); textArea = new JTextArea(6, 20); if (wordWrap) { textArea.setLineWrap(true);/*from w w w . j av a2 s . co m*/ textArea.setWrapStyleWord(true); } textArea.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { queueForUpdate(textArea.getText()); } }); textArea.setText((String) getValue()); JScrollPane scroll = new ScrollPane(textArea); if (name != null) { scroll.setBorder(new TitledBorder(name)); } p.add(scroll); } return p; }