Description
In TableViewSkinBase the texts are static and can therefore not be changed anymore:
127 private static final String EMPTY_TABLE_TEXT = ControlResources.getString("TableView.noContent");
128 private static final String NO_COLUMNS_TEXT = ControlResources.getString("TableView.noColumns");
======================================================
import java.util.Locale;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TableView;
import javafx.stage.Stage;
public class RunTest extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Locale.setDefault(Locale.GERMANY);
TableView<String> tableView1 = new TableView<>();
tableView1.setId("tableView1");
Scene scene = new Scene(tableView1);
primaryStage.setScene(scene);
primaryStage.show();
Locale.setDefault(Locale.US);
TableView<String> tableView2 = new TableView<>();
tableView2.setId("tableView2");
scene.setRoot(tableView2);
}
public static void main(String[] args) {
launch(args);
}
}
127 private static final String EMPTY_TABLE_TEXT = ControlResources.getString("TableView.noContent");
128 private static final String NO_COLUMNS_TEXT = ControlResources.getString("TableView.noColumns");
======================================================
import java.util.Locale;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TableView;
import javafx.stage.Stage;
public class RunTest extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Locale.setDefault(Locale.GERMANY);
TableView<String> tableView1 = new TableView<>();
tableView1.setId("tableView1");
Scene scene = new Scene(tableView1);
primaryStage.setScene(scene);
primaryStage.show();
Locale.setDefault(Locale.US);
TableView<String> tableView2 = new TableView<>();
tableView2.setId("tableView2");
scene.setRoot(tableView2);
}
public static void main(String[] args) {
launch(args);
}
}
Attachments
Issue Links
- relates to
-
JDK-8150841 Button text are not following Locale change in Alert
-
- Closed
-