Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
I can't take it! You are too smart for me! Here is the tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic