sshahine / JFoenix

JavaFX Material Design Library
MIT License
6.27k stars 1.05k forks source link

JFXPopup .setPopupContainer() .setSource() #1074

Closed xxmx1 closed 4 years ago

xxmx1 commented 4 years ago

Hello!

import com.jfoenix.controls.JFXButton; import com.jfoenix.controls.JFXPopup; import com.jfoenix.controls.JFXRippler;

 public void initialize(URL url, ResourceBundle rb) {
        JFXRippler rippler = new JFXRippler(lblMenu);
        rippler.setMaskType(JFXRippler.RipplerMask.RECT);
        menuBar.getChildren().add(rippler);
        openMenu();
        createPage();
    }
    private void openMenu() {
   JFXPopup pop = new JFXPopup();
        pop.setPopupContent(overFlowContainer);
        pop.setPopupContainer(anchor);
        pop.setSource(lblMenu);      
    }

image

why "setPopupContainer and setSource" cannot find symbol ?

setContent change to setPopupContent?

Thanks!!

jfoenixadmin commented 4 years ago

Hello, JFXPopup was reworked long time ago, these two methods were removed. Instead, you need to pass the source node for JFXPopup showmethod, which is called for showing the popup. pop.show(lblMenu, JFXPopup.PopupVPosition.TOP, JFXPopup.PopupHPosition.RIGHT);

Regards,