How To Call JFrame from another Java class

前端 未结 5 1910
渐次进展
渐次进展 2020-12-06 14:46

I am trying to do a simple Jform and call it from another class. I want to use this Jframe in a server client application, but I don\'t know how to open the JFrame class fro

5条回答
  •  暖寄归人
    2020-12-06 15:49

    The constructor of Calculas doesn't show (setVisible) the frame.

    If you want to interact with the Calculas class in this manner, you should also be calling CAL.setVisible(true)

    Also, by convention, all Java instance variables, should start with a lower case character and use camelCase conventions

提交回复
热议问题