⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainframe.java

📁 使用JAVA实现的三维图形处理.可根据输入的曲线方程,如x^2+y^2+z^2=1表示为(1-(Y/50)^2+(Z/60)^2)^(1/2)*100),绘制三维曲线.并可通过拖动鼠标让曲线在三维空间
💻 JAVA
字号:
/*
 * MainFrame.java
 *
 * Created on 2006年12月30日, 下午2:18
 */

package com.crscd.geometry;

import com.sun.org.apache.bcel.internal.classfile.JavaClass;
import java.awt.Graphics;

/**
 *
 * @author  Administrator
 */
public class MainFrame extends javax.swing.JFrame {
    
    /** Creates new form MainFrame */
    private GeometryCanvas  m_canvas = null;
    public MainFrame() {
        initComponents();
        m_canvas = new GeometryCanvas();
        this.getContentPane().add(m_canvas,java.awt.BorderLayout.CENTER);
        this.setBounds(0,0,800,600);
    }
    
    /** 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 by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">//GEN-BEGIN:initComponents
    private void initComponents() {

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainFrame().setVisible(true);
            }
        });
    }
    
    // 变量声明 - 不进行修改//GEN-BEGIN:variables
    // 变量声明结束//GEN-END:variables

    public void paint(Graphics graphics) {
        m_canvas.paint(graphics);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -