开发者

Form handling in net beans desktop applications

hello I have a basic Java ability when it comes to writing code and creating such things as calcs and booking system, I am wanting to use the Desktop application in netbeans for a more professional look but I carnt manage to switch between visual forms i have created using buttons, in vb I would just set the form as me.visible(False) and Form2.visible(true开发者_Python百科). Any ideas guys thanks


Well it is very similar in Java too instead of typing

MyForm().visible(true)

Use

MyForm().setVisible(true);

Basically if you clicked a button and you wanted a new form to be displayed it would look something like

private void jButton1ActionPerformed(ActionEvent evt)
{
    new TestForm().setVisible(true);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜