小编Jon*_*pez的帖子

如何从另一个Java类调用JFrame

我正在尝试做一个简单的Jform并从另一个类调用它.我想在服务器客户端应用程序中使用此Jframe,但我不知道如何从另一个类打开JFrame类.

喜欢用户必须选择

1-打开Jframe.

2-退出.

那我做错了什么?

以下是代码:

Jframe类名为Calculas.java

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author user
 */
public class Calculas extends javax.swing.JFrame {

    /**
     * Creates new form Calculas
     */
    public Calculas() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated …
Run Code Online (Sandbox Code Playgroud)

java user-interface swing jframe

3
推荐指数
1
解决办法
8万
查看次数

标签 统计

java ×1

jframe ×1

swing ×1

user-interface ×1