The only thing wrong (that I can see) is that you should set the "view"
of the ScrollPane to its content, instead of doing an "add".
So, change this:
scrollPane.add(tablePane);
To this:
scrollPane.setView(tablePane);
HTH,
~Roger Whitcomb
On 5/23/13 7:51 AM, marianciu wrote:
Hi
I wont implementation some view in Java (not using *.bxml). I'm not sure
what exactly do it wrong.
I called below method:
private void initialMidleColumn() {
border = new Border();
ScrollPane scrollPane = new ScrollPane();
scrollPane
.setHorizontalScrollBarPolicy(ScrollPane.ScrollBarPolicy.FILL);
TextArea textArea = new TextArea();
textArea.setText("Very long text");
Row row = new Row();
row.add(textArea);
TablePane tablePane = new TablePane();
tablePane.getColumns().add(new Column(1, true));
tablePane.getRows().add(row);
scrollPane.add(tablePane);
border.setContent(scrollPane);
rowPatient.add(border);
}
Let's assume that rowPatient instance is a container.
In this case I can see only *border* (class Border) but object which should
visible inside border aren't visible (ScrollPane, TablePane, TextArea). If I
removed code defined scrollPane, I can see all things ( TablePane,
TextArea).
Code after modification:
private void initialMidleColumn() {
border = new Border();
TextArea textArea = new TextArea();
textArea.setText("Very long text");
Row row = new Row();
row.add(textArea);
TablePane tablePane = new TablePane();
tablePane.getColumns().add(new Column(1, true));
tablePane.getRows().add(row);
border.setContent(tablePane);
rowPatient.add(border);
}
Could you explain me, what I do wrong, that ScrollPane is not visible and
object under ScrollPane aren't visible?
--
View this message in context:
http://apache-pivot-users.399431.n3.nabble.com/ScrollPane-is-not-visible-implementation-in-Java-not-using-bxml-tp4022598.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.