Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[B]JScrollPane.... Help me....[/B]  RSS feed

 
DanielCosta Sobrinho
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI...
I want to place a JScrollPane in this code below, but I am not obtaining to place...
Somebody can help adding a simple JScrollPane.
public TelaMonitor()
{
//estabelece a dimens�o da tela
Dimension tamanhoTela = Toolkit.getDefaultToolkit().getScreenSize();
this.setSize(tamanhoTela);
this.setTitle("Sistema Monitor de Servi�os - Rob� Intranet Bras�lia vers�o 3.0");
this.setResizable(true);
//recursos do pacote swing
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
System.exit(0);
}
});
layout = new FlowLayout();
container = this.getContentPane();
container.setLayout(layout);
layout.setAlignment(FlowLayout.LEFT);//coloca os botoes mais a esquerda da tela
tabela = new Hashtable();
tabela1 = new Hashtable();
tempo = new Timer(1000,this);
this.montaTela();
tempo.start();
}

Thanks...
 
Jon Dornback
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you simply want a JScrollPane inside whatever component TelaMonitor extends, then you need something like:
JScrollPane pane = new JScrollPane();
container.add(pane);
after you set the layout.
does that help?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!