-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
jfx11, jfx20, jfx17, jfx21
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Pagination disappears when setting new one on scene
Run the attached class to see that when the 'disappear' flag is true
and the pagination is not wrapped in a HBox it will disappear.
This does not happen when it is wrapped in a HBox.
In general I think the pagination control is pretty buggy. There are
several open bugs for it here.
I personally run into this one and #8089578 when writing simple tests for it in our application.
This bug could be related to #8088490
CUSTOMER SUBMITTED WORKAROUND :
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.Pagination;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class PaginationDisappear extends Application
{
private boolean disappear = false;
@Override
public void start(Stage stage) throws Exception
{
Pagination pagination = new Pagination(15);
pagination.setMaxPageIndicatorCount(5);
Label label = new Label();
pagination.setPageFactory(index -> {
label.setText("" + (index + 1));
try
{
if(index != 0)
start(stage);
}
catch (Exception e)
{
e.printStackTrace();
}
return label;
});
Parent parent = pagination;
if(!disappear)
parent = new HBox(pagination);
stage.setScene(new Scene(parent));
stage.show();
}
public static void main(String[] args)
{
Application.launch(PaginationDisappear.class);
}
}
FREQUENCY : always
Pagination disappears when setting new one on scene
Run the attached class to see that when the 'disappear' flag is true
and the pagination is not wrapped in a HBox it will disappear.
This does not happen when it is wrapped in a HBox.
In general I think the pagination control is pretty buggy. There are
several open bugs for it here.
I personally run into this one and #8089578 when writing simple tests for it in our application.
This bug could be related to #8088490
CUSTOMER SUBMITTED WORKAROUND :
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.Pagination;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class PaginationDisappear extends Application
{
private boolean disappear = false;
@Override
public void start(Stage stage) throws Exception
{
Pagination pagination = new Pagination(15);
pagination.setMaxPageIndicatorCount(5);
Label label = new Label();
pagination.setPageFactory(index -> {
label.setText("" + (index + 1));
try
{
if(index != 0)
start(stage);
}
catch (Exception e)
{
e.printStackTrace();
}
return label;
});
Parent parent = pagination;
if(!disappear)
parent = new HBox(pagination);
stage.setScene(new Scene(parent));
stage.show();
}
public static void main(String[] args)
{
Application.launch(PaginationDisappear.class);
}
}
FREQUENCY : always
- relates to
-
JDK-8089578 [Pagination] Set current page index issue.
- Open
-
JDK-8088490 Pagination control disappears, when skin is replaced
- Open
-
JDK-8301797 Pagination control has the wrong size
- Resolved