2016-12-31 28 views
1

Javaアプリケーションでは、ログイン成功時に新しいfxmlウィンドウを開きたいだけです。 ログインが正常に終了すると、新しいウィンドウが正常に開きます。 しかし、すべてのは、私はラインでのエラーを取得しています細かい作業にもかかわらず:引数の型が一致しない新しいステージを開くときに例外が発生する

root = FXMLLoader.load(getClass().getResource("../ui/frmMain_ui.fxml")); 

私は混乱しています、それは場所を定義するかどうかの問題..です マイプロジェクト概要:

フォルダ:SRC >フォルダ:UI> .fxmlファイル

フォルダ:SRC>フォルダ:基本>の.javaコントローラ

フォルダファイル:SRC>フォルダ:MAINVIEW> Main.java、ShowForm.java

例外:()メソッド

private void ActionLogin(){ 
     try { 
      if(this.LoginProcess(frmLogin_tbxUsername.getText().toString(), frmLogin_tbxPassword.getText().toString())){ 
       UpdateStatus(); 
       alert = new Alert(Alert.AlertType.INFORMATION); 
       alert.setTitle("Information"); 
       alert.setHeaderText("Success !"); 
       alert.setContentText("Successfully Logged In !"); 

       alert.showAndWait(); 

       openFrom_Main(); // open form method 
       frmLogin_btnLogin.getScene().getWindow().hide(); 
      }else{ 
       alert = new Alert(Alert.AlertType.WARNING); 
       alert.setTitle("Information"); 
       alert.setHeaderText("Failed !"); 
       alert.setContentText("Incorrect Credentials, Please try again !"); 

       alert.showAndWait(); 

       frmLogin_tbxUsername.clear(); 
       frmLogin_tbxPassword.clear(); 
      } 
     }catch (Exception ERROR){ 
      ERROR.printStackTrace(); 
     } 
    } 

マイopenForm_Main::これは私のログインアクションメソッドが

public class ShowForm { 
    public void showFrmMain(Stage mainStage){ 
     Parent root = null; 
     mainStage = new Stage(); 
     mainStage.setTitle("Welcome to Dashboard"); 
     try { 
      root = FXMLLoader.load(getClass().getResource("../ui/frmMain_ui.fxml")); 
      mainStage.setScene(new Scene(root)); 
      mainStage.show(); 
     } catch (IOException e) { 
      e.printStackTrace(); 
     } 
    } 
} 

です:これは私のShowForm.javaある

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: argument type mismatch 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) 
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) 
    at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769) 
    at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657) 
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) 
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) 
    at javafx.event.Event.fireEvent(Event.java:198) 
    at javafx.scene.control.Tab$1.invalidated(Tab.java:209) 
    at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109) 
    at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144) 
    at javafx.scene.control.Tab.setSelected(Tab.java:185) 
    at javafx.scene.control.TabPane$TabPaneSelectionModel.select(TabPane.java:722) 
    at javafx.scene.control.TabPane$TabPaneSelectionModel.select(TabPane.java:735) 
    at javafx.scene.control.TabPane$TabPaneSelectionModel.findNearestAvailableTab(TabPane.java:794) 
    at javafx.scene.control.TabPane$TabPaneSelectionModel.lambda$new$17(TabPane.java:691) 
    at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329) 
    at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73) 
    at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233) 
    at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482) 
    at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541) 
    at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205) 
    at javafx.collections.ModifiableObservableListBase.add(ModifiableObservableListBase.java:155) 
    at java.util.AbstractList.add(AbstractList.java:108) 
    at javafx.fxml.FXMLLoader$Element.add(FXMLLoader.java:168) 
    at javafx.fxml.FXMLLoader$PropertyElement.add(FXMLLoader.java:1403) 
    at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:788) 
    at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2823) 
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2532) 
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) 
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214) 
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175) 
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148) 
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124) 
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104) 
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097) 
    at MainView.ShowForm.showFrmMain**(ShowForm.java:20)** 
    at base.frmLogin_base.openFrom_Main**(frmLogin_base.java:56)** 
    at base.frmLogin_base.ActionLogin**(frmLogin_base.java:69)** 
    at base.frmLogin_base.do_btnLogin**(frmLogin_base.java:43)** 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) 
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) 
    at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769) 
    at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657) 
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) 
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) 
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) 
    at javafx.event.Event.fireEvent(Event.java:198) 
    at javafx.scene.Node.fireEvent(Node.java:8411) 
    at javafx.scene.control.Button.fire(Button.java:185) 
    at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182) 
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96) 
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89) 
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) 
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) 
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) 
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) 
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) 
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) 
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) 
    at javafx.event.Event.fireEvent(Event.java:198) 
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3757) 
    at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485) 
    at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762) 
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494) 
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:380) 
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:294) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:416) 
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389) 
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:415) 
    at com.sun.glass.ui.View.handleMouseEvent(View.java:555) 
    at com.sun.glass.ui.View.notifyMouse(View.java:937) 

private void openFrom_Main(){ 
     new MainView.ShowForm().showFrmMain(new Stage()); 
    } 

実際にはfrmMainには何もありません。

package base; 

import javafx.event.ActionEvent; 
import javafx.fxml.FXML; 
import javafx.scene.control.*; 
import javafx.scene.paint.Color; 
import javafx.scene.text.Font; 

public class frmMain_base { 

    @FXML 
    private Menu frmMain_TitleBar; 

    @FXML 
    private Label frmMain_txtDateTime; 

    @FXML 
    private TableColumn<?, ?> frmMain_tableCol_From; 

    @FXML 
    private TabPane frmMain_tabMsgPane; 

    @FXML 
    private Tab frmMain_tabContacts; 

    @FXML 
    private MenuItem frmMain_MenuItemAbout; 

    @FXML 
    private TableView<?> frmMain_tableView_Message; 

    @FXML 
    private Label frmMain_txtFullName; 

    @FXML 
    private ListView<?> frmMain_ListView_Contacts; 

    @FXML 
    private Label frmMain_txtStatus; 

    @FXML 
    private Button frmMain_msg_btnSend; 

    @FXML 
    private Tab frmMain_tabInbox; 

    @FXML 
    private Tab frmMain_Tab_Milestones; 

    @FXML 
    private TextField frmMain_msg_tbxMessage; 

    @FXML 
    private Tab frmMain_Tab_Issues; 

    @FXML 
    private SplitPane frmMain_SplitPane; 

    @FXML 
    private TextArea frmMain_msg_tbxMsgBox; 

    @FXML 
    private Tab frmMain_Tab_Resolved; 

    @FXML 
    private Button frmMain_btnLogout; 

    @FXML 
    private Tab frmMain_Tab_Features; 

    @FXML 
    private Font x1; 

    @FXML 
    private Color x2; 

    @FXML 
    private TabPane frmMain_TabPane; 

    @FXML 
    private Font x3; 

    @FXML 
    private TableColumn<?, ?> frmMain_tabCol_Message; 

    @FXML 
    private Color x4; 

    @FXML 
    private Label frmMain_txtRank; 

    @FXML 
    void do_ClickTitleBar(ActionEvent event) { 

    } 

    @FXML 
    void do_MenuItemAbout(ActionEvent event) { 

    } 

    @FXML 
    void do_tabContacts_changing(ActionEvent event) { 

    } 

    @FXML 
    void do_OnMouseClick_ListView_Contacts(ActionEvent event) { 

    } 

    @FXML 
    void do_tabInbox_changing(ActionEvent event) { 

    } 

    @FXML 
    void do_msg_btnSend(ActionEvent event) { 

    } 

    @FXML 
    void do_btnLogout(ActionEvent event) { 

    } 

} 

そして、ここで私のfrmMain_ui.fxmlです::この例外は、すべての作業罰金かかわらでも発生している理由

<?xml version="1.0" encoding="UTF-8"?> 

<?import java.lang.*?> 
<?import java.util.*?> 
<?import javafx.geometry.*?> 
<?import javafx.scene.control.*?> 
<?import javafx.scene.layout.*?> 
<?import javafx.scene.paint.*?> 
<?import javafx.scene.text.*?> 

<VBox prefHeight="600.0" prefWidth="1100.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="base.frmMain_base"> 
    <children> 
    <MenuBar VBox.vgrow="NEVER"> 
     <menus> 
     <Menu fx:id="frmMain_TitleBar" mnemonicParsing="false" onAction="#do_ClickTitleBar" text="FiKHSONS INTERNATIONAL Software Dashboard" /> 
     <Menu mnemonicParsing="false" text="Help"> 
      <items> 
      <MenuItem fx:id="frmMain_MenuItemAbout" mnemonicParsing="false" onAction="#do_MenuItemAbout" text="About" /> 
      </items> 
     </Menu> 
     </menus> 
    </MenuBar> 
    <SplitPane fx:id="frmMain_SplitPane" dividerPositions="0.23385300668151449, 0.8708240534521158" focusTraversable="true" prefHeight="-1.0" prefWidth="-1.0" VBox.vgrow="ALWAYS"> 
     <items> 
     <AnchorPane> 
      <children> 
      <Label alignment="CENTER" layoutX="14.0" layoutY="14.0" minWidth="60.0" prefWidth="-1.0" style="&#10;" text="Messages" textAlignment="CENTER" wrapText="false"> 
       <font> 
       <Font size="18.0" fx:id="x1" /> 
       </font> 
       <textFill> 
       <Color blue="0.624" green="0.624" red="0.624" fx:id="x2" /> 
       </textFill> 
      </Label> 
        <SplitPane dividerPositions="0.5" layoutX="4.0" layoutY="43.0" orientation="VERTICAL" prefHeight="499.0" prefWidth="246.0" AnchorPane.bottomAnchor="4.0" AnchorPane.leftAnchor="4.0" AnchorPane.rightAnchor="4.0" AnchorPane.topAnchor="45.0"> 
        <items> 
         <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0"> 
          <children> 
           <TabPane fx:id="frmMain_tabMsgPane" layoutX="51.0" layoutY="31.0" prefHeight="245.0" prefWidth="243.0" tabClosingPolicy="UNAVAILABLE" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
           <tabs> 
            <Tab fx:id="frmMain_tabContacts" onSelectionChanged="#do_tabContacts_changing" text="Contacts"> 
            <content> 
             <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> 
              <children> 
               <ListView fx:id="frmMain_ListView_Contacts" layoutX="22.0" layoutY="14.0" onMouseClicked="#do_OnMouseClick_ListView_Contacts" prefHeight="212.0" prefWidth="243.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> 
              </children> 
              </AnchorPane> 
            </content> 
            </Tab> 
            <Tab fx:id="frmMain_tabInbox" onSelectionChanged="#do_tabInbox_changing" text="Inbox"> 
            <content> 
             <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"> 
              <children> 
               <TableView fx:id="frmMain_tableView_Message" layoutX="22.0" layoutY="6.0" prefHeight="212.0" prefWidth="243.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
                <columns> 
                <TableColumn fx:id="frmMain_tabCol_Message" editable="false" prefWidth="140.0" resizable="false" text="Message" /> 
                <TableColumn fx:id="frmMain_tableCol_From" editable="false" minWidth="4.0" prefWidth="84.0" resizable="false" text="From" /> 
                </columns> 
               </TableView> 
              </children> 
              </AnchorPane> 
            </content> 
            </Tab> 
           </tabs> 
           </TabPane> 
          </children> 
         </AnchorPane> 
         <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0"> 
          <children> 
           <GridPane layoutX="5.0" layoutY="162.0" prefHeight="30.0" prefWidth="217.0" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0"> 
           <columnConstraints> 
            <ColumnConstraints hgrow="SOMETIMES" maxWidth="176.0" minWidth="10.0" prefWidth="157.0" /> 
            <ColumnConstraints hgrow="SOMETIMES" maxWidth="135.0" minWidth="10.0" prefWidth="43.0" /> 
           </columnConstraints> 
           <rowConstraints> 
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> 
           </rowConstraints> 
           <children> 
            <Button fx:id="frmMain_msg_btnSend" alignment="CENTER" contentDisplay="CENTER" defaultButton="true" mnemonicParsing="false" onAction="#do_msg_btnSend" prefHeight="26.0" prefWidth="54.0" text="Send" textAlignment="JUSTIFY" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" /> 
            <TextField fx:id="frmMain_msg_tbxMessage" promptText="Enter your message here !" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" GridPane.valignment="CENTER" GridPane.vgrow="ALWAYS" /> 
           </children> 
           </GridPane> 
           <AnchorPane layoutX="22.0" layoutY="10.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="40.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="5.0"> 
           <children> 
            <TextArea fx:id="frmMain_msg_tbxMsgBox" editable="false" layoutX="17.0" layoutY="14.0" prefHeight="200.0" prefWidth="233.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> 
           </children> 
           </AnchorPane> 
          </children> 
         </AnchorPane> 
        </items> 
        </SplitPane> 
      </children> 
     </AnchorPane> 
     <AnchorPane id="Content" minHeight="-1.0" minWidth="-1.0" prefHeight="545.0" prefWidth="430.0"> 
     <children> 
      <Label alignment="CENTER" font="$x1" layoutX="14.0" layoutY="14.0" style="&#10;" text="Tasks &amp; Scheduling" textAlignment="CENTER" textFill="$x2" wrapText="false" /> 
        <AnchorPane layoutX="14.0" layoutY="57.0" prefHeight="478.0" prefWidth="537.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="57.0"> 
        <children> 
         <TabPane fx:id="frmMain_TabPane" layoutX="143.0" layoutY="100.0" prefHeight="478.0" prefWidth="663.0" style="-fx-border-width: 3.5; -fx-border-color: gray;" tabClosingPolicy="UNAVAILABLE" tabMinWidth="80.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
          <tabs> 
          <Tab fx:id="frmMain_Tab_Issues" text="Issues"> 
           <content> 
           <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> 
           </content> 
          </Tab> 
          <Tab fx:id="frmMain_Tab_Milestones" text="Milestones"> 
           <content> 
           <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> 
           </content> 
          </Tab> 
           <Tab fx:id="frmMain_Tab_Features" text="Features"> 
           <content> 
            <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> 
           </content> 
           </Tab> 
           <Tab fx:id="frmMain_Tab_Resolved" text="Resolved"> 
           <content> 
            <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> 
           </content> 
           </Tab> 
          </tabs> 
         </TabPane> 
        </children> 
        </AnchorPane> 
        <Button fx:id="frmMain_btnLogout" alignment="CENTER" contentDisplay="CENTER" layoutX="619.0" layoutY="13.0" mnemonicParsing="false" onAction="#do_btnLogout" text="Logout" textAlignment="JUSTIFY" AnchorPane.rightAnchor="12.0" AnchorPane.topAnchor="13.0" /> 
     </children> 
     </AnchorPane> 
     <AnchorPane prefWidth="100.0" SplitPane.resizableWithParent="false"> 
      <children> 
        <SplitPane dividerPositions="0.1882998171846435" orientation="VERTICAL" prefHeight="549.0" prefWidth="160.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
        <items> 
         <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="100.0" prefWidth="160.0"> 
          <children> 
           <GridPane layoutX="-51.0" layoutY="5.0" prefHeight="99.0" prefWidth="137.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> 
           <columnConstraints> 
            <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" /> 
           </columnConstraints> 
           <rowConstraints> 
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> 
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> 
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> 
           </rowConstraints> 
           <children> 
            <Label fx:id="frmMain_txtFullName" alignment="CENTER" cache="true" contentDisplay="CENTER" text="txtFullName" textAlignment="JUSTIFY" GridPane.halignment="CENTER" GridPane.valignment="CENTER"> 
             <font> 
              <Font size="10.0" /> 
             </font> 
            </Label> 
            <Label fx:id="frmMain_txtRank" alignment="CENTER" cache="true" contentDisplay="CENTER" text="txtRank" textAlignment="JUSTIFY" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER"> 
             <font> 
              <Font size="10.0" /> 
             </font> 
            </Label> 
            <Label alignment="CENTER" cache="true" text="Mood Coming Soon" textAlignment="JUSTIFY" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER"> 
             <font> 
              <Font size="10.0" /> 
             </font> 
            </Label> 
           </children> 
           </GridPane> 
          </children> 
         </AnchorPane> 
         <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="440.0" prefWidth="100.0" SplitPane.resizableWithParent="false"> 
          <children> 
         <Label alignment="CENTER" contentDisplay="CENTER" font="$x1" style="&#10;" text="News" textAlignment="CENTER" textFill="$x2" wrapText="false" /> 
          </children> 
         </AnchorPane> 
        </items> 
        </SplitPane> 
      </children> 
     </AnchorPane> 
     </items> 
    </SplitPane> 
    <HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER"> 
     <children> 
     <Label fx:id="frmMain_txtStatus" maxHeight="1.7976931348623157E308" maxWidth="-1.0" text="Status" HBox.hgrow="ALWAYS"> 
      <font> 
      <Font size="11.0" fx:id="x3" /> 
      </font> 
      <textFill> 
      <Color blue="0.625" green="0.625" red="0.625" fx:id="x4" /> 
      </textFill> 
     </Label> 
     <Pane prefHeight="-1.0" prefWidth="-1.0" HBox.hgrow="ALWAYS" /> 
     <Label fx:id="frmMain_txtDateTime" font="$x3" maxWidth="-1.0" text="Date &amp; Time" textFill="$x4" HBox.hgrow="NEVER" /> 
     </children> 
     <padding> 
     <Insets bottom="3.0" left="3.0" right="3.0" top="3.0" /> 
     </padding> 
    </HBox> 
    </children> 
</VBox> 

が、私は実際にはわからない は、ここに私のfrmMain_base.java(コントローラ)です。 誰かがそれを指摘して、私が間違ってやっていることや正しい方法で何をすべきかを明確に説明できれば、とても役に立ちます。

ありがとうございました!

+0

問題はあなたの 'frmMain_ui.fxml'ファイルとそのコントローラクラスから来ています。あなたの質問にそれらを含めるように[編集]してください。 –

+0

編集を完了してください。 –

+0

@James_Dありがとうございました –

答えて

0

さて、私はそれを最後に解決しました。

問題は私のfrmMain_ui.fxmlコントローラクラス(frmMain_base.java)でのEventHandlerしていました。..

それがあった:

@FXML 
void do_tabContacts_changing(ActionEvent event) { 

} 

@FXML 
void do_tabInbox_changing(ActionEvent event) { 

} 

ソリューションは、それが "イベント" ではなく「あるべきですActionEvent」、これらのコンポーネントの変化状態を呼び出すためのイベントですので:

@FXML 
void do_tabContacts_changing(Event event) { 

} 

@FXML 
void do_tabInbox_changing(Event event) { 

} 

おかげ方向に私を取得するための仲間を@James_D。

+0

また、イベントパラメータを必要としない場合(そしてほとんどの場合はそうでない場合)、パラメータを持たないメソッドを定義することができ、 'FXMLLoader'がそれを理解することに注意してください。これにより、各ハンドラのパラメータ型を調べる手間を省くことができます。 –

+0

うわー、私はそれを知らなかった。役立つヒントをもう一度おねがいします –

関連する問題