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

Toolbar => excess Buttons have different style when they reappear in the Toolbar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • fx2.1
    • fx2.1
    • javafx
    • Windoes 7, JFX 2.1 b08

    Description

      If I use a Toolbar with Buttons/ToggleButtons and the Toolbar is wider than the available space (width) a menu appears on the right side, which is fine.

      However, if I resize the window (making the available space wider), the buttons appear in the toolbar, BUT their style is different from the buttons, which were visible from the beginning on.

      Their border is missing.

      Test with this code:



      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.*;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;


      public class TestApp3 extends Application {
          public static void main(String[] args) throws Exception {
              launch(args);
          }

          public void start(final Stage stage) throws Exception {

              VBox root = new VBox();

              ToolBar toolBar = new ToolBar();

              ToggleButton toggleButton1 = new ToggleButton("ToggleButton1");
              ToggleButton toggleButton2 = new ToggleButton("ToggleButton2");
              ToggleButton toggleButton3 = new ToggleButton("ToggleButton3");
              ToggleButton toggleButton4 = new ToggleButton("ToggleButton4");
              ToggleButton toggleButton5 = new ToggleButton("ToggleButton5");

              toolBar.getItems().addAll(toggleButton1, toggleButton2, toggleButton3, toggleButton4, toggleButton5);

              Button button1 = new Button("Button1");
              Button button2 = new Button("Button2");
              Button button3 = new Button("Button3");
              Button button4 = new Button("Button4");
              Button button5 = new Button("Button5");

              toolBar.getItems().addAll(button1, button2, button3, button4, button5);

              root.getChildren().add(toolBar);

              Scene scene = new Scene(root, 300, 300);
              stage.setScene(scene);
              stage.show();
          }
      }

      Attachments

        Activity

          People

            kwwong Kinsley Wong (Inactive)
            cschudtjfx Christian Schudt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: