public TrainsScheduleTableFrame() {

    // general GUI configuration
    getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));

    // Set up the jtable in a Scroll Pane..
    trainsPane = new JScrollPane(trainsScheduleTable);
    trainsPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
    trainsPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    trainsScheduleModel.initTable(trainsScheduleTable, this);

    // row comment
    JPanel pC = new JPanel();
    pC.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Comment")));
    pC.setLayout(new GridBagLayout());
    addItem(pC, commentScroller, 1, 0);

    // adjust text area width based on window size
    adjustTextAreaColumnWidth(commentScroller, commentTextArea);

    // Set up the control panel
    // row 1
    JPanel cp1 = new JPanel();
    cp1.setLayout(new BoxLayout(cp1, BoxLayout.X_AXIS));

    // row 1
    JPanel sortBy = new JPanel();
    sortBy.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("SortBy")));
    sortBy.add(sortByTime);
    sortBy.add(sortByName);

    // row 2
    schedule.setBorder(BorderFactory.createTitledBorder(Bundle.getMessage("Active")));
    updateControlPanel();

    cp1.add(sortBy);
    cp1.add(schedule);

    JPanel pButtons = new JPanel();
    pButtons.setLayout(new BoxLayout(pButtons, BoxLayout.X_AXIS));

    JPanel cp3 = new JPanel();
    cp3.setBorder(BorderFactory.createTitledBorder(""));
    cp3.add(clearButton);
    cp3.add(selectButton);

    JPanel cp4 = new JPanel();
    cp4.setBorder(BorderFactory.createTitledBorder(""));
    cp4.add(applyButton);
    cp4.add(buildButton);
    cp4.add(printButton);
    cp4.add(switchListsButton);
    cp4.add(terminateButton);

    JPanel cp5 = new JPanel();
    cp5.setBorder(BorderFactory.createTitledBorder(""));
    cp5.add(activateButton);
    cp5.add(saveButton);

    pButtons.add(cp3);
    pButtons.add(cp4);
    pButtons.add(cp5);

    // tool tips
    selectButton.setToolTipText(Bundle.getMessage("SelectAllButtonTip"));
    clearButton.setToolTipText(Bundle.getMessage("ClearAllButtonTip"));
    applyButton.setToolTipText(Bundle.getMessage("ApplyButtonTip"));
    buildButton.setToolTipText(Bundle.getMessage("BuildSelectedTip"));
    activateButton.setToolTipText(Bundle.getMessage("ActivateButtonTip"));
    terminateButton.setToolTipText(Bundle.getMessage("TerminateSelectedTip"));

    setPrintButtonText();
    setSwitchListButtonText();

    // place controls in scroll pane
    JPanel controlPanel = new JPanel();
    controlPanel.setLayout(new BoxLayout(controlPanel, BoxLayout.Y_AXIS));
    controlPanel.add(pC);
    controlPanel.add(cp1);
    controlPanel.add(pButtons);

    JScrollPane controlPane = new JScrollPane(controlPanel);
    // make sure control panel is the right size
    controlPane.setMinimumSize(new Dimension(500, 480));
    controlPane.setMaximumSize(new Dimension(2000, 500));
    controlPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);

    getContentPane().add(trainsPane);
    getContentPane().add(controlPane);

    // setup buttons
    addButtonAction(clearButton);
    addButtonAction(selectButton);
    addButtonAction(applyButton);
    addButtonAction(buildButton);
    addButtonAction(printButton);
    addButtonAction(switchListsButton);
    addButtonAction(terminateButton);
    addButtonAction(activateButton);
    addButtonAction(saveButton);

    ButtonGroup sortGroup = new ButtonGroup();
    sortGroup.add(sortByTime);
    sortGroup.add(sortByName);
    sortByTime.setSelected(true);

    addRadioButtonAction(sortByTime);
    addRadioButtonAction(sortByName);

    addRadioButtonAction(noneButton);

    // build menu
    JMenuBar menuBar = new JMenuBar();
    JMenu toolMenu = new JMenu(Bundle.getMessage("Tools"));
    toolMenu.add(new TrainsScheduleEditAction());
    menuBar.add(toolMenu);
    setJMenuBar(menuBar);

    // add help menu to window
    addHelpMenu("package.jmri.jmrit.operations.Operations_Timetable", true); // NOI18N

    setTitle(Bundle.getMessage("TitleTimeTableTrains"));

    initMinimumSize(new Dimension(Control.panelWidth700, Control.panelHeight500));

    addHorizontalScrollBarKludgeFix(controlPane, controlPanel);

    Setup.addPropertyChangeListener(this);
    trainManager.addPropertyChangeListener(this);
    trainScheduleManager.addPropertyChangeListener(this);
    addPropertyChangeLocations();
    addPropertyChangeTrainSchedules();
  }