Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8149818

TableView localization could not be changed after first usage

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 8u72
    • javafx

    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);
      }

      }

      Attachments

        Issue Links

          Activity

            People

              leifs Leif Samuelsson (Inactive)
              aliebelt Andreas Liebelt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: