java编程问题(重金!!!)

来源:百度知道 编辑:UC知道 时间:2024/07/01 04:50:31
在一个界面上输入三个坐标 判断这三个点构成的三角形是否是等腰三角形
一旦采用追加分数
需要界面
我不会写啊 就觉得值
大侠 帮个忙写写吧

可以成功判断呀:
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

public class Print implements ActionListener {

JLabel jLabePrompt = new JLabel ("请分别输入三角形的顶点坐标:");
JLabel jLabeResult = new JLabel ("结果");
JTextField jTextField1 = new JTextField (4);
JTextField jTextField2 = new JTextField (4);
JTextField jTextField3 = new JTextField (4);
JButton jButton = new JButton ("判断");
JFrame jFrame = new JFrame ("判断三角形");

Container con = jFrame.getContentPane();

public static void main(String[] aa) {
new Print();
}

public Print() {
con.setLayout(new FlowLayout(FlowLayout.LEFT));
con.add(jLabePrompt);
con.add(jTextField1);
con.add(jTextField2);
con.add(jTextField3);
con.add(jButton