private JInternalFrame _startJFXImpuestosCRUD() {
    frame = new JInternalFrame("Administrador de impuestos");
    final JFXPanel fxPanel = new JFXPanel();

    frame.setClosable(true);
    frame.add(fxPanel);
    frame.setVisible(true);

    Herramientas.panelCatalogo(frame);
    Principal.getEscritorio().getPanelEscritorio().add(frame);
    frame.setSize(706, 518);
    frame.setPreferredSize(new Dimension(706, 518));
    frame.setResizable(true);
    frame.setVisible(true);
    Herramientas.centrarVentana(frame);
    Herramientas.iconificable(frame);
    frame.toFront();

    Platform.runLater(
        new Runnable() {
          @Override
          public void run() {
            Scene scene = null;
            try {
              scene = initImpuestosCRUD();
              scene.setFill(null);
              fxPanel.setScene(scene);
            } catch (IOException e) {

            }
          }
        });

    return frame;
  }
示例#2
0
 public void init() {
   // 向内部窗口中添加组件
   iframe.add(new JScrollPane(new JTextArea(8, 40)));
   desktop.setPreferredSize(new Dimension(400, 300));
   // 把虚拟桌面添加到JFrame窗口中
   jf.add(desktop);
   // 设置内部窗口的大小、位置
   iframe.reshape(0, 0, 300, 200);
   // 显示并选中内部窗口
   iframe.show();
   desktop.add(iframe);
   JPanel jp = new JPanel();
   deskBn.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent event) {
           // 弹出内部对话框,以虚拟桌面作为父组件
           JOptionPane.showInternalMessageDialog(desktop, "属于虚拟桌面的对话框");
         }
       });
   internalBn.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent event) {
           // 弹出内部对话框,以内部窗口作为父组件
           JOptionPane.showInternalMessageDialog(iframe, "属于内部窗口的对话框");
         }
       });
   jp.add(deskBn);
   jp.add(internalBn);
   jf.add(jp, BorderLayout.SOUTH);
   jf.pack();
   jf.setVisible(true);
 }