Ryan Schaefer
Ryan Schaefer

Reputation: 3120

Using Jdf and Intellij: Specifically running a Jfd form in intellij

I don't really understand how to integrate jfd and intellij.

So far I have played around with it a little bit and developed a program that looks like this.

I then generated an actionEventHandler to handle when the add package button is pressed. For now I just kept it simple and had it output "THIS IS A TEST" into the outputField which is the textField in the picture above.

the actionEventHandler looks like this:

private void addPackageButtonActionPerformed(ActionEvent e) {
    outputArea.setText("THIS IS A TEST");
}

I would then expect when I did "Test Form" on the jfd tab I would click the addPackageButton and it would put "THIS IS A TEST" into the outputField.

However, nothing happens. Is this what "Test Form" is for? Or is there another way that I can run my form and test it that I am not seeing? Or is this functionality only available in netbeans?

Upvotes: 0

Views: 288

Answers (1)

Ryan Schaefer
Ryan Schaefer

Reputation: 3120

I figured out how to do this so I will post this for posterity.

Jfd doesn't add a main to your project by default so adding this:

public static void main(String[] args){
    GUIClassName window = new GUIClassName();
    window.setVisible(true);
}

will allow you to run the module and see the window.

Upvotes: 0

Related Questions