Alguem pode meajudar a colocar a ScrollBar no lado direito da janela,semelhante ao windows?
package projetoteste;
import java.awt.Color;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import javax.swing.JFrame;
import javax.swing.JScrollBar;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
/**
*
* @author Luiz
*/
public class ExibePespquisa extends JFrame implements AdjustmentListener{
JScrollBar sb;
JTextArea text;
/** Creates a new instance of ExibePespquisa */
public ExibePespquisa() {
setTitle("ScrollBar");
setBackground(Color.BLACK);
setBounds(200,200,500,400);
text = new JTextArea("ALO");
sb = new JScrollBar(JScrollBar.VERTICAL,0,5,0,100);
add(sb);
//add(sc);
}
public static void main(String[] args ){
ExibePespquisa j = new ExibePespquisa();
j.setVisible(true);
j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}